tv DataFeed rework

This commit is contained in:
tim
2024-08-28 18:57:58 -04:00
parent 55397c2b1c
commit 79a6822fd5
7 changed files with 468 additions and 403 deletions

View File

@@ -5,7 +5,7 @@ import {chart, createShape, deleteShapeId, dragging, draggingShapeIds, drawShape
import {unique} from "@/misc.js";
import {allocationText} from "@/orderbuild.js";
import Color from "color";
import {pointsToOhlcStart} from "@/charts/chart-misc.js";
import {pointsToTvOhlcStart} from "@/charts/chart-misc.js";
//
@@ -202,7 +202,7 @@ export class Shape {
// createShape(this.type, this.points, {overrides:this.props}, new ShapeTVCallbacks(this))
options = {...options}
options['overrides'] = props
this.tvPoints = pointsToOhlcStart(points)
this.tvPoints = pointsToTvOhlcStart(points)
this.tvCallbacks = new ShapeTVCallbacks(this);
const id = createShape(this.type, this.tvPoints, options, this.tvCallbacks)
// todo set id?
@@ -247,7 +247,7 @@ export class Shape {
if (this.id === null)
this.create()
else {
points = pointsToOhlcStart(points)
points = pointsToTvOhlcStart(points)
if (dirtyPoints(this.tvPoints, points)) {
const s = this.tvShape();
const lbe = s._model._lineBeingEdited