openalgo-charts 1.0.4 → 1.0.5

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /** Library version string. Matches package.json (published npm release). */
2
- declare const VERSION = "1.0.4";
2
+ declare const VERSION = "1.0.5";
3
3
  /** Returns the current library version. */
4
4
  declare function version(): string;
5
5
 
@@ -1219,6 +1219,7 @@ declare class Chart {
1219
1219
  private _downLocalY;
1220
1220
  private _dragId;
1221
1221
  private _hoverId;
1222
+ private _overlayFrozen;
1222
1223
  private _dragCb;
1223
1224
  private _dragEndCb;
1224
1225
  private _axisDrag;
@@ -1365,6 +1366,21 @@ declare class Chart {
1365
1366
  private _onFrame;
1366
1367
  private _attachInput;
1367
1368
  private readonly _onPointerEnter;
1369
+ /**
1370
+ * The chart renders as stacked canvases, so the browser's right-click
1371
+ * "Save image as…" would capture only the topmost (transparent overlay)
1372
+ * layer — a blank image. Just before the native menu opens, composite the
1373
+ * clicked pane's base layer *beneath* its overlay bitmap so the saved image
1374
+ * is the visible chart, and freeze overlay repaints (live ticks repaint every
1375
+ * few hundred ms and would wipe the snapshot while the menu is open). The
1376
+ * freeze lifts on the next pointer/wheel/key input after the menu closes.
1377
+ * Apps that present their own menu (preventDefault on contextmenu) are
1378
+ * unaffected. Multi-pane note: the native save captures the clicked pane
1379
+ * only — use `downloadScreenshot()` for the full multi-pane composite.
1380
+ */
1381
+ private readonly _onContextMenu;
1382
+ /** Resume overlay repaints after the native context menu closes. */
1383
+ private _unfreezeOverlay;
1368
1384
  private _localPoint;
1369
1385
  private readonly _onPointerDown;
1370
1386
  private readonly _onPointerMove;