react-cheminfo 0.45.0 → 0.47.0
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/lib/chart/core/chartDomain.d.ts +30 -5
- package/lib/chart/core/chartDomain.d.ts.map +1 -1
- package/lib/chart/core/chartDomain.js +1 -0
- package/lib/chart/core/chartDomain.js.map +1 -1
- package/lib/chart/core/index.d.ts +1 -1
- package/lib/chart/core/index.d.ts.map +1 -1
- package/lib/chart/core/index.js +1 -1
- package/lib/chart/core/index.js.map +1 -1
- package/lib/chart/core/selectionGeometry.d.ts +8 -5
- package/lib/chart/core/selectionGeometry.d.ts.map +1 -1
- package/lib/chart/core/selectionGeometry.js +8 -5
- package/lib/chart/core/selectionGeometry.js.map +1 -1
- package/lib/chart/core/zoomDomain.d.ts +39 -4
- package/lib/chart/core/zoomDomain.d.ts.map +1 -1
- package/lib/chart/core/zoomDomain.js +90 -22
- package/lib/chart/core/zoomDomain.js.map +1 -1
- package/lib/chart/ui/SelectionRect.d.ts.map +1 -1
- package/lib/chart/ui/SelectionRect.js +1 -1
- package/lib/chart/ui/SelectionRect.js.map +1 -1
- package/lib/chart/ui/chartGestures.d.ts +26 -1
- package/lib/chart/ui/chartGestures.d.ts.map +1 -1
- package/lib/chart/ui/chartGestures.js +21 -0
- package/lib/chart/ui/chartGestures.js.map +1 -1
- package/lib/chart/ui/index.d.ts +1 -1
- package/lib/chart/ui/index.d.ts.map +1 -1
- package/lib/chart/ui/index.js +1 -1
- package/lib/chart/ui/index.js.map +1 -1
- package/lib/chart/ui/useChartZoom.d.ts.map +1 -1
- package/lib/chart/ui/useChartZoom.js +17 -1
- package/lib/chart/ui/useChartZoom.js.map +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
- package/lib/ir/core/irMode.d.ts.map +1 -1
- package/lib/ir/core/irMode.js +6 -1
- package/lib/ir/core/irMode.js.map +1 -1
- package/lib/locales/de.json +1 -0
- package/lib/locales/en.json +1 -0
- package/lib/locales/es.json +1 -0
- package/lib/locales/fr.json +1 -0
- package/lib/locales/it.json +1 -0
- package/lib/periodic/core/index.d.ts +1 -1
- package/lib/periodic/core/index.d.ts.map +1 -1
- package/lib/periodic/core/layout.d.ts +11 -0
- package/lib/periodic/core/layout.d.ts.map +1 -1
- package/lib/periodic/core/layout.js.map +1 -1
- package/lib/periodic/ui/ElementCell.d.ts +6 -2
- package/lib/periodic/ui/ElementCell.d.ts.map +1 -1
- package/lib/periodic/ui/ElementCell.js +2 -2
- package/lib/periodic/ui/ElementCell.js.map +1 -1
- package/lib/periodic/ui/PeriodicTable.d.ts +12 -3
- package/lib/periodic/ui/PeriodicTable.d.ts.map +1 -1
- package/lib/periodic/ui/PeriodicTable.js +5 -3
- package/lib/periodic/ui/PeriodicTable.js.map +1 -1
- package/lib/periodic/ui/PeriodicTableChrome.d.ts +13 -3
- package/lib/periodic/ui/PeriodicTableChrome.d.ts.map +1 -1
- package/lib/periodic/ui/PeriodicTableChrome.js +18 -6
- package/lib/periodic/ui/PeriodicTableChrome.js.map +1 -1
- package/lib/split/ui/SplitColumn.d.ts +30 -0
- package/lib/split/ui/SplitColumn.d.ts.map +1 -0
- package/lib/split/ui/SplitColumn.js +20 -0
- package/lib/split/ui/SplitColumn.js.map +1 -0
- package/lib/split/ui/SplitRow.d.ts +15 -53
- package/lib/split/ui/SplitRow.d.ts.map +1 -1
- package/lib/split/ui/SplitRow.js +9 -90
- package/lib/split/ui/SplitRow.js.map +1 -1
- package/lib/split/ui/index.d.ts +3 -0
- package/lib/split/ui/index.d.ts.map +1 -1
- package/lib/split/ui/index.js +1 -0
- package/lib/split/ui/index.js.map +1 -1
- package/lib/split/ui/splitPanes.d.ts +73 -0
- package/lib/split/ui/splitPanes.d.ts.map +1 -0
- package/lib/split/ui/splitPanes.js +128 -0
- package/lib/split/ui/splitPanes.js.map +1 -0
- package/package.json +1 -1
- package/src/chart/core/chartDomain.ts +31 -5
- package/src/chart/core/index.ts +2 -0
- package/src/chart/core/selectionGeometry.ts +8 -5
- package/src/chart/core/zoomDomain.ts +109 -26
- package/src/chart/ui/SelectionRect.tsx +4 -0
- package/src/chart/ui/chartGestures.ts +41 -1
- package/src/chart/ui/index.ts +1 -1
- package/src/chart/ui/useChartZoom.ts +25 -1
- package/src/ir/core/irMode.ts +6 -1
- package/src/locales/de.json +1 -0
- package/src/locales/en.json +1 -0
- package/src/locales/es.json +1 -0
- package/src/locales/fr.json +1 -0
- package/src/locales/it.json +1 -0
- package/src/periodic/core/index.ts +1 -1
- package/src/periodic/core/layout.ts +12 -0
- package/src/periodic/ui/ElementCell.tsx +8 -4
- package/src/periodic/ui/PeriodicTable.tsx +23 -5
- package/src/periodic/ui/PeriodicTableChrome.tsx +28 -4
- package/src/split/ui/SplitColumn.tsx +36 -0
- package/src/split/ui/SplitRow.tsx +17 -208
- package/src/split/ui/index.ts +3 -0
- package/src/split/ui/splitPanes.tsx +267 -0
|
@@ -72,18 +72,29 @@ export declare const DEFAULT_Y_AXIS_RULES: Required<YAxisRules>;
|
|
|
72
72
|
* between forty and sixty percent", so a drag narrows the horizontal axis and
|
|
73
73
|
* leaves the height alone unless it is released past the baseline.
|
|
74
74
|
*
|
|
75
|
+
* `dual` is the same reading gesture with a gate a reader can predict: a drag
|
|
76
|
+
* kept level narrows the horizontal axis alone, and one taken far enough up or
|
|
77
|
+
* down brings the height with it. It is what `xAxis` cannot be on a chart whose
|
|
78
|
+
* vertical axis has no baseline to cross — a titration curve climbing from pH 2
|
|
79
|
+
* to pH 12, a speciation diagram drawn over decades — where "has the pointer
|
|
80
|
+
* passed zero" is a question about the margin rather than about the data, and
|
|
81
|
+
* the answer to it is no for every drag made inside the plot. Here both windows
|
|
82
|
+
* are asked for where the curve is, and the preview changes shape as the
|
|
83
|
+
* threshold is crossed, so the rectangle is found by the hand that was already
|
|
84
|
+
* drawing one.
|
|
85
|
+
*
|
|
75
86
|
* `box` is the tool: while it is chosen, the rectangle dragged out is the window,
|
|
76
87
|
* both axes at once. It is a mode rather than a modifier because it is used in
|
|
77
88
|
* runs — a baseline being examined is examined several times over — and a
|
|
78
89
|
* modifier held down through each of them is a worse gesture than a tool pressed
|
|
79
90
|
* once.
|
|
80
91
|
*
|
|
81
|
-
* The
|
|
82
|
-
* nothing but zoom tools can say so in its own signature — which is
|
|
83
|
-
* `select`, the one drag that moves no axis, from reaching a chart
|
|
84
|
-
* handler for it.
|
|
92
|
+
* The three are named apart from the whole of `DragMode` so that a chart
|
|
93
|
+
* offering nothing but zoom tools can say so in its own signature — which is
|
|
94
|
+
* what stops `select`, the one drag that moves no axis, from reaching a chart
|
|
95
|
+
* with no handler for it.
|
|
85
96
|
*/
|
|
86
|
-
export type ZoomDragMode = 'xAxis' | 'box';
|
|
97
|
+
export type ZoomDragMode = 'xAxis' | 'dual' | 'box';
|
|
87
98
|
/**
|
|
88
99
|
* What a drag across the plot asks for.
|
|
89
100
|
*
|
|
@@ -141,6 +152,20 @@ export interface ZoomGestures {
|
|
|
141
152
|
* @default true
|
|
142
153
|
*/
|
|
143
154
|
wheel?: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Whether the chart answers `f` with a window fitted to everything drawn.
|
|
157
|
+
*
|
|
158
|
+
* The same thing the double click does, reachable without a pointer — and the
|
|
159
|
+
* one gesture a reader cannot discover by trying, which is why the key is the
|
|
160
|
+
* same `f` on every chart of the family rather than each one choosing.
|
|
161
|
+
*
|
|
162
|
+
* Turned off by a viewer that already owns its keys: the infrared shell runs
|
|
163
|
+
* `f` through its own command table, where the key is listed in a toolbar
|
|
164
|
+
* tooltip and in the documentation panel, and fits every pane of a stack
|
|
165
|
+
* rather than the one chart the pointer is on.
|
|
166
|
+
* @default true
|
|
167
|
+
*/
|
|
168
|
+
keys?: boolean;
|
|
144
169
|
}
|
|
145
170
|
/** What the gestures come to when a viewer states none of them. */
|
|
146
171
|
export declare const DEFAULT_ZOOM_GESTURES: Required<ZoomGestures>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chartDomain.d.ts","sourceRoot":"","sources":["../../../src/chart/core/chartDomain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,oDAAoD;AACpD,MAAM,WAAW,WAAW;IAC1B,2CAA2C;IAC3C,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpB,kFAAkF;IAClF,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,UAAU,CAIrD,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"chartDomain.d.ts","sourceRoot":"","sources":["../../../src/chart/core/chartDomain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,oDAAoD;AACpD,MAAM,WAAW,WAAW;IAC1B,2CAA2C;IAC3C,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpB,kFAAkF;IAClF,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,UAAU,CAIrD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAEpD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE/C,gEAAgE;AAChE,MAAM,WAAW,SAAU,SAAQ,UAAU;IAC3C;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,mEAAmE;AACnE,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,YAAY,CAIxD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,WAAW,GAChB,OAAO,CAOT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chartDomain.js","sourceRoot":"","sources":["../../../src/chart/core/chartDomain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAoDH,gEAAgE;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAAyB;IACxD,QAAQ,EAAE,CAAC;IACX,YAAY,EAAE,IAAI;IAClB,UAAU,EAAE,KAAK;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"chartDomain.js","sourceRoot":"","sources":["../../../src/chart/core/chartDomain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAoDH,gEAAgE;AAChE,MAAM,CAAC,MAAM,oBAAoB,GAAyB;IACxD,QAAQ,EAAE,CAAC;IACX,YAAY,EAAE,IAAI;IAClB,UAAU,EAAE,KAAK;CAClB,CAAC;AA6GF,mEAAmE;AACnE,MAAM,CAAC,MAAM,qBAAqB,GAA2B;IAC3D,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;CACX,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAoB,EACpB,IAAiB;IAEjB,OAAO,CACL,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAC3B,CAAC;AACJ,CAAC"}
|
|
@@ -52,5 +52,5 @@ export { READOUT_GAP, READOUT_LINES, READOUT_WIDTH, readoutPlacement, } from './
|
|
|
52
52
|
export type { ViewBox, ViewState, ZoomBounds } from './viewTransform.ts';
|
|
53
53
|
export { INITIAL_VIEW, MAXIMUM_CONTENT_SCALE, MAXIMUM_ZOOM, MINIMUM_ZOOM, baseViewBox, clampZoom, magnificationOf, panBy, viewBoxAttribute, viewBoxOf, zoomAbout, zoomToAboutCentre, } from './viewTransform.ts';
|
|
54
54
|
export type { DragBox, ZoomSelection } from './zoomDomain.ts';
|
|
55
|
-
export { MINIMUM_DRAG, releasedBeyondBaseline, scaledYAxis, zoomSelection, zoomedDomain, } from './zoomDomain.ts';
|
|
55
|
+
export { DUAL_ZOOM_TRAVEL, MINIMUM_DRAG, draggedBeyondLevel, releasedBeyondBaseline, scaledYAxis, zoomSelection, zoomedDomain, } from './zoomDomain.ts';
|
|
56
56
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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AAwB,CAAC;AAC5D,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,YAAY,EACZ,eAAe,EACf,WAAW,EACX,aAAa,EACb,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAClE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EACL,WAAW,EACX,aAAa,EACb,aAAa,EACb,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,SAAS,EACT,eAAe,EACf,KAAK,EACL,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,aAAa,EACb,YAAY,GACb,MAAM,iBAAiB,CAAC"}
|
package/lib/chart/core/index.js
CHANGED
|
@@ -33,5 +33,5 @@ export { svgPointAt } from "./svgPoint.js";
|
|
|
33
33
|
export { areaPath, profilePath, stickPath } from "./tracePath.js";
|
|
34
34
|
export { READOUT_GAP, READOUT_LINES, READOUT_WIDTH, readoutPlacement, } from "./trackerReadout.js";
|
|
35
35
|
export { INITIAL_VIEW, MAXIMUM_CONTENT_SCALE, MAXIMUM_ZOOM, MINIMUM_ZOOM, baseViewBox, clampZoom, magnificationOf, panBy, viewBoxAttribute, viewBoxOf, zoomAbout, zoomToAboutCentre, } from "./viewTransform.js";
|
|
36
|
-
export { MINIMUM_DRAG, releasedBeyondBaseline, scaledYAxis, zoomSelection, zoomedDomain, } from "./zoomDomain.js";
|
|
36
|
+
export { DUAL_ZOOM_TRAVEL, MINIMUM_DRAG, draggedBeyondLevel, releasedBeyondBaseline, scaledYAxis, zoomSelection, zoomedDomain, } from "./zoomDomain.js";
|
|
37
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/chart/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,cAAc,GACf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAMhD,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EACL,UAAU,EACV,eAAe,EACf,UAAU,EACV,UAAU,GACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,eAA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B,CAAC;AAElE,OAAO,EACL,WAAW,EACX,aAAa,EACb,aAAa,EACb,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,SAAS,EACT,eAAe,EACf,KAAK,EACL,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,WAAW,EACX,aAAa,EACb,YAAY,GACb,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/chart/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,cAAc,GACf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAMhD,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EACL,UAAU,EACV,eAAe,EACf,UAAU,EACV,UAAU,GACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,S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AM,qBAAqB,CAAC;AAE7B,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,SAAS,EACT,eAAe,EACf,KAAK,EACL,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,aAAa,EACb,YAAY,GACb,MAAM,iBAAiB,CAAC"}
|
|
@@ -25,12 +25,15 @@ export interface SelectionRectangle {
|
|
|
25
25
|
/**
|
|
26
26
|
* The rectangle to draw for a drag being made.
|
|
27
27
|
*
|
|
28
|
-
* A drag that takes the y axis with it is drawn at the height
|
|
29
|
-
*
|
|
28
|
+
* A drag that takes the y axis with it is drawn at the height `zoomSelection`
|
|
29
|
+
* worked out — the window the release will take, which is the drag's own height
|
|
30
|
+
* stretched to any baseline the viewer holds — and one that asks for the x axis
|
|
31
|
+
* alone spans the whole plot.
|
|
30
32
|
* That is the gesture announcing itself before the button is let go: the
|
|
31
|
-
* rectangle changing shape as the pointer crosses the baseline
|
|
32
|
-
*
|
|
33
|
-
* they can still act
|
|
33
|
+
* rectangle changing shape — as the pointer crosses the baseline, or as a
|
|
34
|
+
* `dual` drag leaves the level it started on — is the only warning a user gets
|
|
35
|
+
* that the release is about to move both axes, and it is one they can still act
|
|
36
|
+
* on.
|
|
34
37
|
*
|
|
35
38
|
* A drag too short to zoom draws nothing at all. Below `MINIMUM_DRAG` the
|
|
36
39
|
* release does nothing — most clicks made on a trackpad wobble by a pixel or two
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectionGeometry.d.ts","sourceRoot":"","sources":["../../../src/chart/core/selectionGeometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,gDAAgD;AAChD,MAAM,WAAW,kBAAkB;IACjC,qBAAqB;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,oBAAoB;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED
|
|
1
|
+
{"version":3,"file":"selectionGeometry.d.ts","sourceRoot":"","sources":["../../../src/chart/core/selectionGeometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,gDAAgD;AAChD,MAAM,WAAW,kBAAkB;IACjC,qBAAqB;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,oBAAoB;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,aAAa,GAAG,IAAI,EAC/B,IAAI,EAAE,QAAQ,GACb,kBAAkB,GAAG,IAAI,CAe3B"}
|
|
@@ -14,12 +14,15 @@ import { MINIMUM_DRAG } from "./zoomDomain.js";
|
|
|
14
14
|
/**
|
|
15
15
|
* The rectangle to draw for a drag being made.
|
|
16
16
|
*
|
|
17
|
-
* A drag that takes the y axis with it is drawn at the height
|
|
18
|
-
*
|
|
17
|
+
* A drag that takes the y axis with it is drawn at the height `zoomSelection`
|
|
18
|
+
* worked out — the window the release will take, which is the drag's own height
|
|
19
|
+
* stretched to any baseline the viewer holds — and one that asks for the x axis
|
|
20
|
+
* alone spans the whole plot.
|
|
19
21
|
* That is the gesture announcing itself before the button is let go: the
|
|
20
|
-
* rectangle changing shape as the pointer crosses the baseline
|
|
21
|
-
*
|
|
22
|
-
* they can still act
|
|
22
|
+
* rectangle changing shape — as the pointer crosses the baseline, or as a
|
|
23
|
+
* `dual` drag leaves the level it started on — is the only warning a user gets
|
|
24
|
+
* that the release is about to move both axes, and it is one they can still act
|
|
25
|
+
* on.
|
|
23
26
|
*
|
|
24
27
|
* A drag too short to zoom draws nothing at all. Below `MINIMUM_DRAG` the
|
|
25
28
|
* release does nothing — most clicks made on a trackpad wobble by a pixel or two
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectionGeometry.js","sourceRoot":"","sources":["../../../src/chart/core/selectionGeometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAInD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAc/C
|
|
1
|
+
{"version":3,"file":"selectionGeometry.js","sourceRoot":"","sources":["../../../src/chart/core/selectionGeometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAInD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAc/C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,kBAAkB,CAChC,SAA+B,EAC/B,IAAc;IAEd,IAAI,SAAS,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAEpC,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,SAAS,CAAC;IACzD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAChE,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACjE,MAAM,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC;IAC3B,IAAI,CAAC,CAAC,KAAK,IAAI,YAAY,CAAC;QAAE,OAAO,IAAI,CAAC;IAE1C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IAC9D,CAAC;IACD,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAClE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG,EAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -23,6 +23,18 @@ import type { ChartScale } from './chartScale.ts';
|
|
|
23
23
|
* hundred down went somewhere.
|
|
24
24
|
*/
|
|
25
25
|
export declare const MINIMUM_DRAG = 4;
|
|
26
|
+
/**
|
|
27
|
+
* How far a `dual` drag has to travel vertically before it brings the y axis
|
|
28
|
+
* with it, in user units of the SVG.
|
|
29
|
+
*
|
|
30
|
+
* Far enough above `MINIMUM_DRAG` that no drag meant to stay level reaches it by
|
|
31
|
+
* the tremor of a hand or the slope of a trackpad swipe, and near enough that
|
|
32
|
+
* the rectangle a reader wants costs one gesture rather than a reach for the
|
|
33
|
+
* margin. The preview changes shape on the pixel it is crossed, so the number
|
|
34
|
+
* itself never has to be learnt: the first drag that crosses it teaches the
|
|
35
|
+
* gesture, and the first that recrosses it back shows the way out.
|
|
36
|
+
*/
|
|
37
|
+
export declare const DUAL_ZOOM_TRAVEL = 24;
|
|
26
38
|
/** The two corners of a drag, in the user units of the SVG. */
|
|
27
39
|
export interface DragBox {
|
|
28
40
|
/** Where the press landed, horizontally. */
|
|
@@ -34,7 +46,17 @@ export interface DragBox {
|
|
|
34
46
|
/** Where it is vertically. */
|
|
35
47
|
toY: number;
|
|
36
48
|
}
|
|
37
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* The drag as it is being made, for the preview rectangle to be drawn from.
|
|
51
|
+
*
|
|
52
|
+
* Its **vertical corners are the window the release will take**, not the two
|
|
53
|
+
* places the hand passed through. The two differ by the baseline a viewer's
|
|
54
|
+
* rules hold: on a mirrored chart zero runs across the middle of the plot, so a
|
|
55
|
+
* drag made wholly inside the reflected half crosses the baseline without ever
|
|
56
|
+
* reaching it, and the release stretches the window back to zero. A rectangle
|
|
57
|
+
* drawn at the height of the hand would promise a band between two intensities
|
|
58
|
+
* that letting go does not give.
|
|
59
|
+
*/
|
|
38
60
|
export interface ZoomSelection extends DragBox {
|
|
39
61
|
/**
|
|
40
62
|
* Whether letting go here would take the y axis with it, which is what the
|
|
@@ -49,9 +71,9 @@ export interface ZoomSelection extends DragBox {
|
|
|
49
71
|
* than by the rectangle itself — so what the preview promises and what letting
|
|
50
72
|
* go actually does are the same test rather than two that have to agree.
|
|
51
73
|
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
74
|
+
* Which answer a mode gives is `takesYAxis`'s business, so a `select` drag is
|
|
75
|
+
* always a band however far past the baseline it strays, and a `dual` drag
|
|
76
|
+
* becomes a rectangle the moment it has travelled `DUAL_ZOOM_TRAVEL`.
|
|
55
77
|
* @param drag - The drag being made, `null` when none is.
|
|
56
78
|
* @param yScale - The y axis as it is currently zoomed.
|
|
57
79
|
* @param rules - How the y axis behaves and what a drag means, defaulting to a
|
|
@@ -59,6 +81,19 @@ export interface ZoomSelection extends DragBox {
|
|
|
59
81
|
* @returns The selection to draw, `null` when there is no drag.
|
|
60
82
|
*/
|
|
61
83
|
export declare function zoomSelection(drag: DragBox | null, yScale: ChartScale, rules?: ZoomRules): ZoomSelection | null;
|
|
84
|
+
/**
|
|
85
|
+
* Whether a drag has left the level it started on by enough to ask for the y
|
|
86
|
+
* axis as well.
|
|
87
|
+
*
|
|
88
|
+
* Measured as the hand made it, before any clamping to the plot: a drag that ran
|
|
89
|
+
* out over the tick labels travelled however far it travelled. Nothing is
|
|
90
|
+
* latched — the answer is read off the two corners and nothing else — so a
|
|
91
|
+
* reader who drifted down and came back up is promised a band again, and the
|
|
92
|
+
* preview says so while the button is still down.
|
|
93
|
+
* @param drag - The drag being made or released, in user units of the SVG.
|
|
94
|
+
* @returns Whether the height comes along.
|
|
95
|
+
*/
|
|
96
|
+
export declare function draggedBeyondLevel(drag: DragBox): boolean;
|
|
62
97
|
/**
|
|
63
98
|
* Whether a drag let go here asks for the y axis as well.
|
|
64
99
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoomDomain.d.ts","sourceRoot":"","sources":["../../../src/chart/core/zoomDomain.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"zoomDomain.d.ts","sourceRoot":"","sources":["../../../src/chart/core/zoomDomain.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAY,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B;;;;;;;;;;GAUG;AAC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ewhere.
|
|
24
24
|
*/
|
|
25
25
|
export const MINIMUM_DRAG = 4;
|
|
26
|
+
/**
|
|
27
|
+
* How far a `dual` drag has to travel vertically before it brings the y axis
|
|
28
|
+
* with it, in user units of the SVG.
|
|
29
|
+
*
|
|
30
|
+
* Far enough above `MINIMUM_DRAG` that no drag meant to stay level reaches it by
|
|
31
|
+
* the tremor of a hand or the slope of a trackpad swipe, and near enough that
|
|
32
|
+
* the rectangle a reader wants costs one gesture rather than a reach for the
|
|
33
|
+
* margin. The preview changes shape on the pixel it is crossed, so the number
|
|
34
|
+
* itself never has to be learnt: the first drag that crosses it teaches the
|
|
35
|
+
* gesture, and the first that recrosses it back shows the way out.
|
|
36
|
+
*/
|
|
37
|
+
export const DUAL_ZOOM_TRAVEL = 24;
|
|
26
38
|
/**
|
|
27
39
|
* The drag as the preview rectangle needs it.
|
|
28
40
|
*
|
|
@@ -30,9 +42,9 @@ export const MINIMUM_DRAG = 4;
|
|
|
30
42
|
* than by the rectangle itself — so what the preview promises and what letting
|
|
31
43
|
* go actually does are the same test rather than two that have to agree.
|
|
32
44
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
45
|
+
* Which answer a mode gives is `takesYAxis`'s business, so a `select` drag is
|
|
46
|
+
* always a band however far past the baseline it strays, and a `dual` drag
|
|
47
|
+
* becomes a rectangle the moment it has travelled `DUAL_ZOOM_TRAVEL`.
|
|
36
48
|
* @param drag - The drag being made, `null` when none is.
|
|
37
49
|
* @param yScale - The y axis as it is currently zoomed.
|
|
38
50
|
* @param rules - How the y axis behaves and what a drag means, defaulting to a
|
|
@@ -42,20 +54,36 @@ export const MINIMUM_DRAG = 4;
|
|
|
42
54
|
export function zoomSelection(drag, yScale, rules = {}) {
|
|
43
55
|
if (drag === null)
|
|
44
56
|
return null;
|
|
45
|
-
const { baseline = DEFAULT_Y_AXIS_RULES.baseline, pointsDown = DEFAULT_Y_AXIS_RULES.pointsDown, drag: mode = 'xAxis', } = rules;
|
|
57
|
+
const { baseline = DEFAULT_Y_AXIS_RULES.baseline, keepBaseline = DEFAULT_Y_AXIS_RULES.keepBaseline, pointsDown = DEFAULT_Y_AXIS_RULES.pointsDown, drag: mode = 'xAxis', } = rules;
|
|
58
|
+
const zoomsYAxis = takesYAxis(drag, mode, yScale, baseline, pointsDown);
|
|
59
|
+
// Stretched in pixels rather than in values because the rectangle is drawn in
|
|
60
|
+
// pixels and the mapping is monotonic, so including the baseline's own pixel
|
|
61
|
+
// in the span is including the baseline in the window.
|
|
62
|
+
const held = zoomsYAxis && holdsBaseline(mode, keepBaseline);
|
|
63
|
+
const atBaseline = chartPixel(yScale, baseline);
|
|
46
64
|
return {
|
|
47
65
|
fromX: drag.fromX,
|
|
48
|
-
fromY: drag.fromY,
|
|
66
|
+
fromY: held ? Math.min(drag.fromY, drag.toY, atBaseline) : drag.fromY,
|
|
49
67
|
toX: drag.toX,
|
|
50
|
-
toY: drag.toY,
|
|
51
|
-
|
|
52
|
-
// the first pixel of the gesture rather than a full-height band that
|
|
53
|
-
// suddenly becomes one; a select drag never takes it at all.
|
|
54
|
-
zoomsYAxis: mode === 'box' ||
|
|
55
|
-
(mode !== 'select' &&
|
|
56
|
-
releasedBeyondBaseline(drag.toY, yScale, baseline, pointsDown)),
|
|
68
|
+
toY: held ? Math.max(drag.fromY, drag.toY, atBaseline) : drag.toY,
|
|
69
|
+
zoomsYAxis,
|
|
57
70
|
};
|
|
58
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Whether a drag has left the level it started on by enough to ask for the y
|
|
74
|
+
* axis as well.
|
|
75
|
+
*
|
|
76
|
+
* Measured as the hand made it, before any clamping to the plot: a drag that ran
|
|
77
|
+
* out over the tick labels travelled however far it travelled. Nothing is
|
|
78
|
+
* latched — the answer is read off the two corners and nothing else — so a
|
|
79
|
+
* reader who drifted down and came back up is promised a band again, and the
|
|
80
|
+
* preview says so while the button is still down.
|
|
81
|
+
* @param drag - The drag being made or released, in user units of the SVG.
|
|
82
|
+
* @returns Whether the height comes along.
|
|
83
|
+
*/
|
|
84
|
+
export function draggedBeyondLevel(drag) {
|
|
85
|
+
return Math.abs(drag.toY - drag.fromY) >= DUAL_ZOOM_TRAVEL;
|
|
86
|
+
}
|
|
59
87
|
/**
|
|
60
88
|
* Whether a drag let go here asks for the y axis as well.
|
|
61
89
|
*
|
|
@@ -124,21 +152,18 @@ export function zoomedDomain(current, drag, plot, xScale, yScale, rules = {}) {
|
|
|
124
152
|
Math.min(firstX, secondX),
|
|
125
153
|
Math.max(firstX, secondX),
|
|
126
154
|
];
|
|
127
|
-
|
|
128
|
-
// go; the reading gesture takes the height only when it crossed the baseline.
|
|
129
|
-
if (mode !== 'box' &&
|
|
130
|
-
!releasedBeyondBaseline(drag.toY, yScale, baseline, pointsDown)) {
|
|
155
|
+
if (!takesYAxis(drag, mode, yScale, baseline, pointsDown)) {
|
|
131
156
|
return { x, y: current.y };
|
|
132
157
|
}
|
|
133
158
|
const fromY = chartValue(yScale, clamp(drag.fromY, plot.top, plot.bottom));
|
|
134
159
|
const toY = chartValue(yScale, clamp(drag.toY, plot.top, plot.bottom));
|
|
135
160
|
// Both ends, so a baseline the data runs *down* from — 100 percent
|
|
136
|
-
// transmittance — is kept as surely as one it stands on.
|
|
137
|
-
//
|
|
138
|
-
//
|
|
139
|
-
//
|
|
140
|
-
// drawn.
|
|
141
|
-
const holdBaseline =
|
|
161
|
+
// transmittance — is kept as surely as one it stands on. Only the reading
|
|
162
|
+
// gesture holds a baseline: a rectangle dragged out deliberately, by the box
|
|
163
|
+
// tool or by a `dual` drag that left its level, is a promise about exactly
|
|
164
|
+
// that rectangle, and a viewer whose axis rules keep its baseline would
|
|
165
|
+
// otherwise see a taller window than the one drawn.
|
|
166
|
+
const holdBaseline = holdsBaseline(mode, keepBaseline);
|
|
142
167
|
const bottom = holdBaseline
|
|
143
168
|
? Math.min(baseline, fromY, toY)
|
|
144
169
|
: Math.min(fromY, toY);
|
|
@@ -172,4 +197,47 @@ export function scaledYAxis(current, factor, baseline = DEFAULT_Y_AXIS_RULES.bas
|
|
|
172
197
|
];
|
|
173
198
|
return y[1] > y[0] ? { x: current.x, y } : current;
|
|
174
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* Whether a drag brings the y axis with it, which is the one question the
|
|
202
|
+
* preview and the release must never answer differently.
|
|
203
|
+
*
|
|
204
|
+
* Asked once, here, rather than by each of them: a rectangle that promises a
|
|
205
|
+
* height the release then refuses teaches a reader that the chart is
|
|
206
|
+
* unreliable, and two copies of this test are how that comes about.
|
|
207
|
+
*
|
|
208
|
+
* The box tool takes the height always, so its preview is a rectangle from the
|
|
209
|
+
* first pixel of the gesture rather than a full-height band that suddenly
|
|
210
|
+
* becomes one. A `select` drag never takes it at all: its answer is two numbers
|
|
211
|
+
* on one axis, and a preview that grew into a rectangle would promise a height
|
|
212
|
+
* nobody is ever told about.
|
|
213
|
+
* @param drag - The drag being made or released, in user units of the SVG.
|
|
214
|
+
* @param mode - What a drag on this chart asks for.
|
|
215
|
+
* @param yScale - The y axis as it is currently zoomed.
|
|
216
|
+
* @param baseline - The value the reading gesture is judged against.
|
|
217
|
+
* @param pointsDown - Whether the data hangs below that baseline.
|
|
218
|
+
* @returns Whether the height comes along.
|
|
219
|
+
*/
|
|
220
|
+
/**
|
|
221
|
+
* Whether the window keeps the baseline whatever the drag asked for, which the
|
|
222
|
+
* preview and the release must agree on as surely as they agree on the height.
|
|
223
|
+
*
|
|
224
|
+
* Only the reading gesture holds it. A rectangle dragged out deliberately — by
|
|
225
|
+
* the box tool, or by a `dual` drag that left its level — is a promise about
|
|
226
|
+
* exactly that rectangle.
|
|
227
|
+
* @param mode - What a drag on this chart asks for.
|
|
228
|
+
* @param keepBaseline - Whether the viewer's rules keep it.
|
|
229
|
+
* @returns Whether the baseline stays in the window.
|
|
230
|
+
*/
|
|
231
|
+
function holdsBaseline(mode, keepBaseline) {
|
|
232
|
+
return keepBaseline && mode === 'xAxis';
|
|
233
|
+
}
|
|
234
|
+
function takesYAxis(drag, mode, yScale, baseline, pointsDown) {
|
|
235
|
+
if (mode === 'box')
|
|
236
|
+
return true;
|
|
237
|
+
if (mode === 'select')
|
|
238
|
+
return false;
|
|
239
|
+
if (mode === 'dual')
|
|
240
|
+
return draggedBeyondLevel(drag);
|
|
241
|
+
return releasedBeyondBaseline(drag.toY, yScale, baseline, pointsDown);
|
|
242
|
+
}
|
|
175
243
|
//# sourceMappingURL=zoomDomain.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoomDomain.js","sourceRoot":"","sources":["../../../src/chart/core/zoomDomain.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"zoomDomain.js","sourceRoot":"","sources":["../../../src/chart/core/zoomDomain.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAGnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAE9B;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAiCnC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,aAAa,CAC3B,IAAoB,EACpB,MAAkB,EAClB,QAAmB,EAAE;IAErB,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;I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ui/SelectionRect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,SAAS,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,yEAAyE;IACzE,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"SelectionRect.d.ts","sourceRoot":"","sources":["../../../src/chart/ui/SelectionRect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,SAAS,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,yEAAyE;IACzE,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,GAAG,IAAI,CAoB5E"}
|
|
@@ -22,7 +22,7 @@ export function SelectionRect(props) {
|
|
|
22
22
|
const rectangle = selectionRectangle(selection, plot);
|
|
23
23
|
if (rectangle === null)
|
|
24
24
|
return null;
|
|
25
|
-
return (_jsx("rect", { x: rectangle.x, y: rectangle.y, width: rectangle.width, height: rectangle.height, pointerEvents: "none", style: selectionStyle }));
|
|
25
|
+
return (_jsx("rect", { "data-testid": "chart-selection", x: rectangle.x, y: rectangle.y, width: rectangle.width, height: rectangle.height, pointerEvents: "none", style: selectionStyle }));
|
|
26
26
|
}
|
|
27
27
|
const selectionStyle = {
|
|
28
28
|
fill: CHART_COLORS.selection,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionRect.js","sourceRoot":"","sources":["../../../src/chart/ui/SelectionRect.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAUlE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAElC,MAAM,SAAS,GAAG,kBAAkB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACtD,IAAI,SAAS,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAEpC,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"SelectionRect.js","sourceRoot":"","sources":["../../../src/chart/ui/SelectionRect.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAUlE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAElC,MAAM,SAAS,GAAG,kBAAkB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACtD,IAAI,SAAS,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAEpC,OAAO,CACL,8BAIc,iBAAiB,EAC7B,CAAC,EAAE,SAAS,CAAC,CAAC,EACd,CAAC,EAAE,SAAS,CAAC,CAAC,EACd,KAAK,EAAE,SAAS,CAAC,KAAK,EACtB,MAAM,EAAE,SAAS,CAAC,MAAM,EACxB,aAAa,EAAC,MAAM,EACpB,KAAK,EAAE,cAAc,GACrB,CACH,CAAC;AACJ,CAAC;AAED,MAAM,cAAc,GAAG;IACrB,IAAI,EAAE,YAAY,CAAC,SAAS;IAC5B,MAAM,EAAE,YAAY,CAAC,eAAe;CAC5B,CAAC"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* exactly where it was, and deciding between them in one place is what stops a
|
|
14
14
|
* gesture reporting a range and a click for the same drag.
|
|
15
15
|
*/
|
|
16
|
-
import type { PointerEvent as ReactPointerEvent } from 'react';
|
|
16
|
+
import type { KeyboardEvent as ReactKeyboardEvent, PointerEvent as ReactPointerEvent } from 'react';
|
|
17
17
|
import type { ChartDomain, ZoomRules } from '../core/chartDomain.ts';
|
|
18
18
|
import type { PlotRect } from '../core/chartGeometry.ts';
|
|
19
19
|
import type { ChartScale } from '../core/chartScale.ts';
|
|
@@ -21,6 +21,7 @@ import type { ChartPoint } from '../core/svgPoint.ts';
|
|
|
21
21
|
import type { DragBox } from '../core/zoomDomain.ts';
|
|
22
22
|
/** One gesture on the SVG, as React hands it over. */
|
|
23
23
|
type PointerHandler = (event: ReactPointerEvent<SVGSVGElement>) => void;
|
|
24
|
+
type KeyboardHandler = (event: ReactKeyboardEvent<SVGSVGElement>) => void;
|
|
24
25
|
/**
|
|
25
26
|
* Which keys were held as a click was let go.
|
|
26
27
|
*
|
|
@@ -45,7 +46,31 @@ export interface ChartZoomHandlers {
|
|
|
45
46
|
onPointerUp: PointerHandler;
|
|
46
47
|
onPointerCancel: PointerHandler;
|
|
47
48
|
onDoubleClick: () => void;
|
|
49
|
+
onKeyDown: KeyboardHandler;
|
|
50
|
+
/**
|
|
51
|
+
* So the chart can hold the caret, which is what lets a key reach it.
|
|
52
|
+
*
|
|
53
|
+
* In the tab order rather than merely focusable by a click, because the chart
|
|
54
|
+
* is* the widget here: a reader who navigates by keyboard has no other way to
|
|
55
|
+
* reach it, and a chart nobody can focus answers no key at all. A viewer that
|
|
56
|
+
* answers none takes itself back out of the order.
|
|
57
|
+
*/
|
|
58
|
+
tabIndex: number;
|
|
48
59
|
}
|
|
60
|
+
/** The key that fits the window to everything drawn, on every chart. */
|
|
61
|
+
export declare const FIT_KEY = "f";
|
|
62
|
+
/**
|
|
63
|
+
* Whether a key press asks for the window to be fitted.
|
|
64
|
+
*
|
|
65
|
+
* A key pressed with a modifier belongs to the browser or to the page — Ctrl+F
|
|
66
|
+
* is a search, and a chart that swallowed it to fit itself would be a chart
|
|
67
|
+
* people stop typing near — and a key delivered to a field is part of what is
|
|
68
|
+
* being written. Compared case-insensitively, so a capital arriving from a held
|
|
69
|
+
* shift still fits.
|
|
70
|
+
* @param event - The key press, as React delivers it or as the DOM does.
|
|
71
|
+
* @returns Whether the chart should fit its window.
|
|
72
|
+
*/
|
|
73
|
+
export declare function asksToFit(event: Pick<KeyboardEvent, 'key' | 'ctrlKey' | 'metaKey' | 'altKey' | 'target'>): boolean;
|
|
49
74
|
/** What a host asks to be told, beyond the window it is shown anyway. */
|
|
50
75
|
export interface ChartGestureReports {
|
|
51
76
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chartGestures.d.ts","sourceRoot":"","sources":["../../../src/chart/ui/chartGestures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"chartGestures.d.ts","sourceRoot":"","sources":["../../../src/chart/ui/chartGestures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,aAAa,IAAI,kBAAkB,EACnC,YAAY,IAAI,iBAAiB,EAClC,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EA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AS,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACtE;;;;;;;;;;;;OAYG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC;CAClD;AAED,iEAAiE;AACjE,MAAM,WAAW,IAAK,SAAQ,OAAO;IACnC,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,OAAO,EACjB,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,mBAAmB,EAC5B,SAAS,GAAE,mBAAkC,GAC5C,WAAW,GAAG,IAAI,CAcpB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,iBAAiB,CAAC,aAAa,CAAC,EACvC,GAAG,EAAE,aAAa,GAAG,IAAI,EACzB,eAAe,EAAE,CAAC,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,GAAG,SAAS,GAC5D,IAAI,GAAG,IAAI,CAeb;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,IAAI,GAAG,IAAI,EACjB,KAAK,EAAE,iBAAiB,CAAC,aAAa,CAAC,EACvC,GAAG,EAAE,aAAa,GAAG,IAAI,GACxB,IAAI,GAAG,IAAI,CAKb;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,CAAC,aAAa,CAAC,GAAG,IAAI,CAIzE"}
|
|
@@ -13,12 +13,33 @@
|
|
|
13
13
|
* exactly where it was, and deciding between them in one place is what stops a
|
|
14
14
|
* gesture reporting a range and a click for the same drag.
|
|
15
15
|
*/
|
|
16
|
+
import { isEditingField } from "../../panel/core/isEditingField.js";
|
|
16
17
|
import { chartValue } from "../core/chartScale.js";
|
|
17
18
|
import { svgPointAt } from "../core/svgPoint.js";
|
|
18
19
|
import { MINIMUM_DRAG, zoomedDomain } from "../core/zoomDomain.js";
|
|
19
20
|
import { isInsidePlot } from "./useChartPointer.js";
|
|
20
21
|
/** No key held, which is what a plain click reports. */
|
|
21
22
|
export const NO_MODIFIERS = { shift: false, alt: false };
|
|
23
|
+
/** The key that fits the window to everything drawn, on every chart. */
|
|
24
|
+
export const FIT_KEY = 'f';
|
|
25
|
+
/**
|
|
26
|
+
* Whether a key press asks for the window to be fitted.
|
|
27
|
+
*
|
|
28
|
+
* A key pressed with a modifier belongs to the browser or to the page — Ctrl+F
|
|
29
|
+
* is a search, and a chart that swallowed it to fit itself would be a chart
|
|
30
|
+
* people stop typing near — and a key delivered to a field is part of what is
|
|
31
|
+
* being written. Compared case-insensitively, so a capital arriving from a held
|
|
32
|
+
* shift still fits.
|
|
33
|
+
* @param event - The key press, as React delivers it or as the DOM does.
|
|
34
|
+
* @returns Whether the chart should fit its window.
|
|
35
|
+
*/
|
|
36
|
+
export function asksToFit(event) {
|
|
37
|
+
if (event.ctrlKey || event.metaKey || event.altKey)
|
|
38
|
+
return false;
|
|
39
|
+
if (isEditingField(event.target))
|
|
40
|
+
return false;
|
|
41
|
+
return event.key.toLowerCase() === FIT_KEY;
|
|
42
|
+
}
|
|
22
43
|
/**
|
|
23
44
|
* What letting go of a drag comes to, told to the host on the way.
|
|
24
45
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chartGestures.js","sourceRoot":"","sources":["../../../src/chart/ui/chartGestures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAOH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CA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AM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,EAClE,SAAS,CACV,CAAC;AACJ,CAAC;AAED,2EAA2E;AAC3E,MAAM,WAAW,GAAG,CAAC,CAAC"}
|
package/lib/chart/ui/index.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export { SelectionRect } from './SelectionRect.tsx';
|
|
|
34
34
|
export type { LegendEntry, TraceLegendProps } from './TraceLegend.tsx';
|
|
35
35
|
export { TraceLegend } from './TraceLegend.tsx';
|
|
36
36
|
export type { ChartClickModifiers } from './chartGestures.ts';
|
|
37
|
-
export { NO_MODIFIERS } from './chartGestures.ts';
|
|
37
|
+
export { FIT_KEY, NO_MODIFIERS, asksToFit } from './chartGestures.ts';
|
|
38
38
|
export { chartSurfaceStyle } from './chartSurface.ts';
|
|
39
39
|
export type { ChartPointer, ChartPointerOptions } from './useChartPointer.ts';
|
|
40
40
|
export { isInsidePlot, leftChart, nextChartPointer, sameReading, useChartPointer, } from './useChartPointer.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/ui/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EACV,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AA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