reimplement raylines
This commit is contained in:
@ -5,4 +5,5 @@ export * from './global-params';
|
||||
export * from './legend';
|
||||
export * from './table';
|
||||
export * from './toolbox';
|
||||
export * from './topbar';
|
||||
export * from './topbar';
|
||||
export * from '../horizontal-line/ray-line';
|
||||
@ -17,7 +17,7 @@ export class HorizontalLinePaneView extends DrawingPaneView {
|
||||
const timeScale = this._source.chart.timeScale()
|
||||
const series = this._source.series;
|
||||
if (this._source._type == "RayLine") {
|
||||
this._point.x = timeScale.logicalToCoordinate(point.logical);
|
||||
this._point.x = point.time ? timeScale.timeToCoordinate(point.time) : timeScale.logicalToCoordinate(point.logical);
|
||||
}
|
||||
this._point.y = series.priceToCoordinate(point.price);
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ export class RayLine extends HorizontalLine {
|
||||
_type = 'RayLine';
|
||||
|
||||
constructor(point: Point, options: DeepPartial<DrawingOptions>) {
|
||||
super(point, options);
|
||||
super({...point}, options);
|
||||
this._point.time = point.time;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user