@pipsend/charts 2.3.0 → 2.3.2

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
@@ -189,7 +189,19 @@ export declare class BrushTool extends DrawingToolBase {
189
189
  private _finishStroke;
190
190
  private _isOverAnotherDrawing;
191
191
  private _releasePointer;
192
+ /**
193
+ * Where a press lands relative to the drawing area, or null if it lands
194
+ * outside it. `clamp` pins the point to the edge instead, for a stroke that
195
+ * is already under way.
196
+ */
192
197
  private _toPanePoint;
198
+ /**
199
+ * The pane's element is the whole row, price axis cells included, so its
200
+ * bounds are not the drawing area's. Taking them for it is what let a press
201
+ * on an axis start a stroke — and be swallowed, leaving the chart unable to
202
+ * be stretched while the brush was armed.
203
+ */
204
+ private _drawArea;
193
205
  private _paneElement;
194
206
  /** At most one repaint per frame, however fast the samples arrive. */
195
207
  private _queueRepaint;
@@ -1133,6 +1145,7 @@ export declare class PositionLine implements ISeriesPrimitive, ControllableLine
1133
1145
  private readonly _paneViews;
1134
1146
  private readonly _axisViews;
1135
1147
  private readonly _colorParser;
1148
+ private readonly _labelLayout;
1136
1149
  private _options;
1137
1150
  private _theme;
1138
1151
  private _requestUpdate?;
@@ -1155,6 +1168,13 @@ export declare class PositionLine implements ISeriesPrimitive, ControllableLine
1155
1168
  isDraggable(): boolean;
1156
1169
  isClickable(): boolean;
1157
1170
  priceAt(paneY: number): number | null;
1171
+ /**
1172
+ * Where the level being dragged actually sits. The controller measures the
1173
+ * pointer against it so the level moves by what the pointer moved, instead
1174
+ * of jumping to sit under it — which matters most when the label has been
1175
+ * fanned away from its own line.
1176
+ */
1177
+ dragAnchorY(): number | null;
1158
1178
  beginDrag(): void;
1159
1179
  dragTo(price: number): void;
1160
1180
  commitDrag(): void;
@@ -3360,6 +3380,12 @@ export interface ControllableLine {
3360
3380
  * `click` can answer for that part rather than for the line as a whole.
3361
3381
  */
3362
3382
  setHoveredPart?(part: string | null): void;
3383
+ /**
3384
+ * Optional. Where the thing being dragged currently sits, in pane
3385
+ * coordinates. When a line reports it, the drag keeps the distance between
3386
+ * the pointer and that point instead of snapping the line under the cursor.
3387
+ */
3388
+ dragAnchorY?(): number | null;
3363
3389
  priceAt(paneY: number): number | null;
3364
3390
  beginDrag(): void;
3365
3391
  dragTo(price: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "private": false,
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "name": "@pipsend/charts",
5
5
  "author": "Pipsend",
6
6
  "license": "SEE LICENSE IN LICENSE",