@pipsend/charts 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/typings.d.ts CHANGED
@@ -15,6 +15,7 @@ declare abstract class DrawingToolBase implements IDrawingTool {
15
15
  private _generateId;
16
16
  get id(): string;
17
17
  get type(): string;
18
+ isComplete(): boolean;
18
19
  /**
19
20
  * Lets a tool hand the base its own options object, once, in the constructor.
20
21
  *
@@ -139,6 +140,7 @@ export declare class ArrowTool extends DrawingToolBase {
139
140
  protected _serializeShape(): SerializedDrawingTool;
140
141
  private _requestUpdate;
141
142
  protected _update(): void;
143
+ isComplete(): boolean;
142
144
  remove(): void;
143
145
  }
144
146
  /**
@@ -258,6 +260,7 @@ export declare class CircleTool extends DrawingToolBase {
258
260
  protected _serializeShape(): SerializedDrawingTool;
259
261
  private _requestUpdate;
260
262
  protected _update(): void;
263
+ isComplete(): boolean;
261
264
  remove(): void;
262
265
  }
263
266
  /**
@@ -384,6 +387,9 @@ export declare class DrawingToolsManager {
384
387
  private readonly _selectionChanged;
385
388
  private _isDragging;
386
389
  private _draggedToolId;
390
+ private _pendingToolIds;
391
+ private _completionCheck;
392
+ private readonly _drawingCompleted;
387
393
  constructor(chart: IChartApi, series: ISeriesApi<any>, options?: DrawingToolsManagerOptions);
388
394
  /**
389
395
  * Start drawing a new tool of the specified type
@@ -404,6 +410,12 @@ export declare class DrawingToolsManager {
404
410
  * were different, and neither survived a restore.
405
411
  */
406
412
  addTool(tool: DrawingToolBase, id?: string): string;
413
+ hasPendingDrawing(): boolean;
414
+ /** Removes every tool still waiting for points; returns how many were dropped. */
415
+ cancelPendingDrawings(): number;
416
+ subscribeDrawingCompleted(handler: (toolId: string) => void): void;
417
+ unsubscribeDrawingCompleted(handler: (toolId: string) => void): void;
418
+ private _scheduleCompletionCheck;
407
419
  /**
408
420
  * Remove a tool by ID
409
421
  */
@@ -687,6 +699,7 @@ export declare class FibonacciFanTool extends DrawingToolBase {
687
699
  protected _serializeShape(): SerializedDrawingTool;
688
700
  private _requestUpdate;
689
701
  protected _update(): void;
702
+ isComplete(): boolean;
690
703
  remove(): void;
691
704
  }
692
705
  export declare class FibonacciTool extends DrawingToolBase {
@@ -747,6 +760,7 @@ export declare class FibonacciTool extends DrawingToolBase {
747
760
  */
748
761
  private _hitTestPrimitive;
749
762
  hitTest(x: number, y: number): boolean;
763
+ isComplete(): boolean;
750
764
  remove(): void;
751
765
  destroy(): void;
752
766
  private _requestUpdate;
@@ -933,6 +947,7 @@ export declare class ParallelChannelTool extends DrawingToolBase {
933
947
  isSelected(): boolean;
934
948
  setHovered(hovered: boolean): void;
935
949
  isHovered(): boolean;
950
+ isComplete(): boolean;
936
951
  remove(): void;
937
952
  protected _serializeShape(): SerializedDrawingTool;
938
953
  }
@@ -990,6 +1005,7 @@ export declare class PitchforkTool extends DrawingToolBase {
990
1005
  isSelected(): boolean;
991
1006
  setHovered(hovered: boolean): void;
992
1007
  isHovered(): boolean;
1008
+ isComplete(): boolean;
993
1009
  remove(): void;
994
1010
  protected _serializeShape(): SerializedDrawingTool;
995
1011
  }
@@ -1051,6 +1067,7 @@ export declare class PolygonTool extends DrawingToolBase {
1051
1067
  isHovered(): boolean;
1052
1068
  /** The corners, for callers that need the shape rather than its picture. */
1053
1069
  points(): readonly PolygonVertex[];
1070
+ isComplete(): boolean;
1054
1071
  remove(): void;
1055
1072
  protected _serializeShape(): SerializedDrawingTool;
1056
1073
  }
@@ -1269,6 +1286,7 @@ export declare class RectangleTool extends DrawingToolBase {
1269
1286
  protected _serializeShape(): SerializedDrawingTool;
1270
1287
  private _requestUpdate;
1271
1288
  protected _update(): void;
1289
+ isComplete(): boolean;
1272
1290
  remove(): void;
1273
1291
  }
1274
1292
  export declare class RulerCalculator {
@@ -1495,6 +1513,7 @@ export declare class TrendLineTool extends DrawingToolBase {
1495
1513
  private _dragStartPoint1;
1496
1514
  private _dragStartPoint2;
1497
1515
  private _isComplete;
1516
+ private _interactive;
1498
1517
  private _previewPoint;
1499
1518
  constructor(context: DrawingContext, options: TrendLineToolOptions);
1500
1519
  private _initializeInteractiveMode;
@@ -1543,6 +1562,7 @@ export declare class TrendLineTool extends DrawingToolBase {
1543
1562
  protected _serializeShape(): SerializedDrawingTool;
1544
1563
  private _requestUpdate;
1545
1564
  protected _update(): void;
1565
+ isComplete(): boolean;
1546
1566
  remove(): void;
1547
1567
  }
1548
1568
  export declare class VerticalLineTool extends DrawingToolBase {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.0",
2
+ "version": "2.2.1",
3
3
  "name": "@pipsend/charts",
4
4
  "author": "Pipsend",
5
5
  "license": "SEE LICENSE IN LICENSE",