implement keep_drawings

This commit is contained in:
louisnw
2024-05-27 22:24:55 +01:00
parent eaa961a184
commit 16b07546e2
8 changed files with 42 additions and 43 deletions

View File

@ -52,7 +52,7 @@ export class Handler {
public _seriesList: ISeriesApi<SeriesType>[] = [];
// TODO make some subcharts in the vite dev window and mess with the CSS to see if you can not need the position param. also see if you can remove resizing each time the window resizes?
// TODO find a better solution rather than the 'position' parameter
constructor(
chartId: string,
innerWidth: number,

View File

@ -128,16 +128,6 @@ export class ToolBox {
this.saveDrawings()
}
// renderDrawings() {
// if (this.mouseDown) return
// this.drawings.forEach((item) => {
// if ('price' in item) return
// let startDate = Math.round(item.from[0]/this.chart.interval)*this.chart.interval
// let endDate = Math.round(item.to[0]/this.chart.interval)*this.chart.interval
// item.calculateAndSet(startDate, item.from[1], endDate, item.to[1])
// })
// }
addNewDrawing(d: Drawing) {
this._drawingTool.addNewDrawing(d);
}