scichart 2.2.2404 → 2.2.2411
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/Charting/ChartModifiers/ChartModifierBase.d.ts +2 -0
- package/Charting/ChartModifiers/ChartModifierBase.js +4 -0
- package/Charting/ChartModifiers/DataPointSelectionModifier.js +0 -6
- package/Charting/ChartModifiers/ModifierMouseArgs.d.ts +7 -2
- package/Charting/ChartModifiers/ModifierMouseArgs.js +9 -5
- package/Charting/ChartModifiers/PinchZoomModifier.js +0 -2
- package/Charting/ChartModifiers/XAxisDragModifier.js +0 -2
- package/Charting/ChartModifiers/YAxisDragModifier.js +0 -2
- package/Charting/ChartModifiers/ZoomPanModifier.js +0 -3
- package/Charting/Visuals/RenderableSeries/HitTest/BandSeriesHitTestProvider.js +9 -0
- package/Charting/Visuals/RenderableSeries/HitTest/BaseHitTestProvider.js +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/BubbleSeriesHitTestProvider.js +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/ColumnSeriesHitTestProvider.js +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/ErrorSeriesHitTestProvider.js +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/ImpulseSeriesHitTestProvider.js +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/LineSeriesHitTestProvider.js +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/MountainSeriesHitTestProvider.js +3 -0
- package/Charting/Visuals/RenderableSeries/HitTest/OhlcSeriesHitTestProvider.js +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/ScatterSeriesHitTestProvider.js +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/StackedColumnSeriesHitTestProvider.js +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/StackedMountainSeriesHitTestProvider.js +6 -0
- package/Charting/Visuals/RenderableSeries/HitTest/UniformHeatmapHitTestProvider.js +3 -0
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/Core/Mouse/MouseManager.js +14 -5
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +1 -1
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +95 -95
- package/_wasm/scichart3d.wasm +0 -0
- package/package.json +1 -1
- package/utils/number.js +2 -0
|
@@ -78,6 +78,8 @@ export interface IChartModifierBase extends IThemeable, IDeletable {
|
|
|
78
78
|
onParentSurfaceRendered(): void;
|
|
79
79
|
/**
|
|
80
80
|
* Method called when mouse-down or touch-down occurs on the parent {@link SciChartSurfaceBase}
|
|
81
|
+
* Call args.nativeEvent.preventDefault() to prevent default browser actions
|
|
82
|
+
* like fast scroll for mouse wheel click and dragging of selected elements
|
|
81
83
|
* @param args the {@link ModifierMouseArgs} containing data about the mouse event
|
|
82
84
|
* @param scs the {@link SciChartSurfaceBase} on which method was called
|
|
83
85
|
*/
|
|
@@ -112,6 +112,10 @@ var ChartModifierBase = /** @class */ (function () {
|
|
|
112
112
|
/** @inheritDoc */
|
|
113
113
|
ChartModifierBase.prototype.modifierMouseDown = function (args) {
|
|
114
114
|
// Override in derived class to be notified of mouse down
|
|
115
|
+
if (this.executeOn === ExecuteOn_1.EExecuteOn.MouseMiddleButton) {
|
|
116
|
+
// Don't scroll browser if middle button is being used for the modifier
|
|
117
|
+
args.nativeEvent.preventDefault();
|
|
118
|
+
}
|
|
115
119
|
};
|
|
116
120
|
/** @inheritDoc */
|
|
117
121
|
ChartModifierBase.prototype.modifierMouseMove = function (args) {
|
|
@@ -203,9 +203,6 @@ var DataPointSelectionModifier = /** @class */ (function (_super) {
|
|
|
203
203
|
this.startPoint = pointFromTrans;
|
|
204
204
|
this.isClicked = true;
|
|
205
205
|
}
|
|
206
|
-
if (args.isMaster) {
|
|
207
|
-
args.target.setPointerCapture(args.pointerId);
|
|
208
|
-
}
|
|
209
206
|
args.handled = true;
|
|
210
207
|
};
|
|
211
208
|
/**
|
|
@@ -250,9 +247,6 @@ var DataPointSelectionModifier = /** @class */ (function (_super) {
|
|
|
250
247
|
}
|
|
251
248
|
this.isClicked = false;
|
|
252
249
|
this.selectionRect.isHidden = true;
|
|
253
|
-
if (args.isMaster) {
|
|
254
|
-
args.target.releasePointerCapture(args.pointerId);
|
|
255
|
-
}
|
|
256
250
|
}
|
|
257
251
|
};
|
|
258
252
|
Object.defineProperty(DataPointSelectionModifier.prototype, "selectionStrokeThickness", {
|
|
@@ -13,6 +13,7 @@ declare type TModifierMouseArgsParams = {
|
|
|
13
13
|
shiftKey?: boolean;
|
|
14
14
|
ctrlKey?: boolean;
|
|
15
15
|
altKey?: boolean;
|
|
16
|
+
nativeEvent?: MouseEvent;
|
|
16
17
|
};
|
|
17
18
|
/**
|
|
18
19
|
* Mouse arguments passed to {@link ChartModifierBase} methods
|
|
@@ -25,12 +26,12 @@ export declare class ModifierMouseArgs extends ModifierArgsBase {
|
|
|
25
26
|
static fromMouseEvent(mouseEvent: MouseEvent): ModifierMouseArgs;
|
|
26
27
|
/**
|
|
27
28
|
* Creates a {@link ModifierMouseArgs} instance from Javascript {@link WheelEvent}
|
|
28
|
-
* @param
|
|
29
|
+
* @param wheelEvent the Javascript {@link WheelEvent}
|
|
29
30
|
*/
|
|
30
31
|
static fromWheelEvent(wheelEvent: WheelEvent): ModifierMouseArgs;
|
|
31
32
|
/**
|
|
32
33
|
* Creates a {@link ModifierMouseArgs} instance from Javascript {@link PointerEvent}
|
|
33
|
-
* @param
|
|
34
|
+
* @param pointerEvent the Javascript {@link PointerEvent}
|
|
34
35
|
*/
|
|
35
36
|
static fromPointerEvent(pointerEvent: PointerEvent): ModifierMouseArgs;
|
|
36
37
|
/**
|
|
@@ -88,6 +89,10 @@ export declare class ModifierMouseArgs extends ModifierArgsBase {
|
|
|
88
89
|
* When true, the Ctrl Key is currently pressed
|
|
89
90
|
*/
|
|
90
91
|
readonly ctrlKey: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* The native pointer event
|
|
94
|
+
*/
|
|
95
|
+
nativeEvent: MouseEvent;
|
|
91
96
|
/**
|
|
92
97
|
* Creates an instance of {@link ModifierMouseArgs}
|
|
93
98
|
* @param mousePoint the mouse point as an X,Y location
|
|
@@ -55,6 +55,7 @@ var ModifierMouseArgs = /** @class */ (function (_super) {
|
|
|
55
55
|
_this.shiftKey = options === null || options === void 0 ? void 0 : options.shiftKey;
|
|
56
56
|
_this.altKey = options === null || options === void 0 ? void 0 : options.altKey;
|
|
57
57
|
_this.ctrlKey = options === null || options === void 0 ? void 0 : options.ctrlKey;
|
|
58
|
+
_this.nativeEvent = options === null || options === void 0 ? void 0 : options.nativeEvent;
|
|
58
59
|
return _this;
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
@@ -69,13 +70,14 @@ var ModifierMouseArgs = /** @class */ (function (_super) {
|
|
|
69
70
|
isMaster: true,
|
|
70
71
|
shiftKey: mouseEvent.shiftKey,
|
|
71
72
|
ctrlKey: mouseEvent.ctrlKey,
|
|
72
|
-
altKey: mouseEvent.altKey
|
|
73
|
+
altKey: mouseEvent.altKey,
|
|
74
|
+
nativeEvent: mouseEvent
|
|
73
75
|
};
|
|
74
76
|
return new ModifierMouseArgs(mousePoint, options);
|
|
75
77
|
};
|
|
76
78
|
/**
|
|
77
79
|
* Creates a {@link ModifierMouseArgs} instance from Javascript {@link WheelEvent}
|
|
78
|
-
* @param
|
|
80
|
+
* @param wheelEvent the Javascript {@link WheelEvent}
|
|
79
81
|
*/
|
|
80
82
|
ModifierMouseArgs.fromWheelEvent = function (wheelEvent) {
|
|
81
83
|
Guard_1.Guard.notNull(wheelEvent, "wheelEvent");
|
|
@@ -86,13 +88,14 @@ var ModifierMouseArgs = /** @class */ (function (_super) {
|
|
|
86
88
|
isMaster: true,
|
|
87
89
|
shiftKey: wheelEvent.shiftKey,
|
|
88
90
|
ctrlKey: wheelEvent.ctrlKey,
|
|
89
|
-
altKey: wheelEvent.altKey
|
|
91
|
+
altKey: wheelEvent.altKey,
|
|
92
|
+
nativeEvent: wheelEvent
|
|
90
93
|
};
|
|
91
94
|
return new ModifierMouseArgs(mousePoint, options);
|
|
92
95
|
};
|
|
93
96
|
/**
|
|
94
97
|
* Creates a {@link ModifierMouseArgs} instance from Javascript {@link PointerEvent}
|
|
95
|
-
* @param
|
|
98
|
+
* @param pointerEvent the Javascript {@link PointerEvent}
|
|
96
99
|
*/
|
|
97
100
|
ModifierMouseArgs.fromPointerEvent = function (pointerEvent) {
|
|
98
101
|
Guard_1.Guard.notNull(pointerEvent, "pointerEvent");
|
|
@@ -105,7 +108,8 @@ var ModifierMouseArgs = /** @class */ (function (_super) {
|
|
|
105
108
|
isMaster: true,
|
|
106
109
|
shiftKey: pointerEvent.shiftKey,
|
|
107
110
|
ctrlKey: pointerEvent.ctrlKey,
|
|
108
|
-
altKey: pointerEvent.altKey
|
|
111
|
+
altKey: pointerEvent.altKey,
|
|
112
|
+
nativeEvent: pointerEvent
|
|
109
113
|
};
|
|
110
114
|
return new ModifierMouseArgs(mousePoint, options);
|
|
111
115
|
};
|
|
@@ -81,7 +81,6 @@ var PinchZoomModifier = /** @class */ (function (_super) {
|
|
|
81
81
|
}
|
|
82
82
|
this.activeTouchEvents.set(args.pointerId, args);
|
|
83
83
|
args.handled = true;
|
|
84
|
-
args.target.setPointerCapture(args.pointerId);
|
|
85
84
|
};
|
|
86
85
|
/**
|
|
87
86
|
* @inheritDoc
|
|
@@ -164,7 +163,6 @@ var PinchZoomModifier = /** @class */ (function (_super) {
|
|
|
164
163
|
PinchZoomModifier.prototype.removeFromActiveTouchEvents = function (args) {
|
|
165
164
|
// Remove this event from the target's cache
|
|
166
165
|
this.activeTouchEvents.delete(args.pointerId);
|
|
167
|
-
args.target.releasePointerCapture(args.pointerId);
|
|
168
166
|
// reset distance values
|
|
169
167
|
if (this.activeTouchEvents.size < 2) {
|
|
170
168
|
this.previousHorizontalTouchPointsDistance = undefined;
|
|
@@ -134,7 +134,6 @@ var XAxisDragModifier = /** @class */ (function (_super) {
|
|
|
134
134
|
this.updateCursor(args.mousePoint);
|
|
135
135
|
this.pointFrom = undefined;
|
|
136
136
|
this.isClickedOverXAxis = false;
|
|
137
|
-
args.target.releasePointerCapture(args.pointerId);
|
|
138
137
|
};
|
|
139
138
|
XAxisDragModifier.prototype.toJSON = function () {
|
|
140
139
|
var json = _super.prototype.toJSON.call(this);
|
|
@@ -218,7 +217,6 @@ var XAxisDragModifier = /** @class */ (function (_super) {
|
|
|
218
217
|
this.initialVisibleRanges = initialVisibleRanges;
|
|
219
218
|
this.pointFrom = args.mousePoint;
|
|
220
219
|
args.handled = true;
|
|
221
|
-
args.target.setPointerCapture(args.pointerId);
|
|
222
220
|
};
|
|
223
221
|
return XAxisDragModifier;
|
|
224
222
|
}(ChartModifierBase2D_1.ChartModifierBase2D));
|
|
@@ -133,7 +133,6 @@ var YAxisDragModifier = /** @class */ (function (_super) {
|
|
|
133
133
|
this.updateCursor(args.mousePoint);
|
|
134
134
|
this.pointFrom = undefined;
|
|
135
135
|
this.isClickedOverYAxis = false;
|
|
136
|
-
args.target.releasePointerCapture(args.pointerId);
|
|
137
136
|
};
|
|
138
137
|
YAxisDragModifier.prototype.toJSON = function () {
|
|
139
138
|
var json = _super.prototype.toJSON.call(this);
|
|
@@ -217,7 +216,6 @@ var YAxisDragModifier = /** @class */ (function (_super) {
|
|
|
217
216
|
this.initialVisibleRanges = initialVisibleRanges;
|
|
218
217
|
this.pointFrom = args.mousePoint;
|
|
219
218
|
args.handled = true;
|
|
220
|
-
args.target.setPointerCapture(args.pointerId);
|
|
221
219
|
};
|
|
222
220
|
return YAxisDragModifier;
|
|
223
221
|
}(ChartModifierBase2D_1.ChartModifierBase2D));
|
|
@@ -94,7 +94,6 @@ var ZoomPanModifier = /** @class */ (function (_super) {
|
|
|
94
94
|
this.parentSurface.setZoomState(ZoomState_1.EZoomState.UserZooming);
|
|
95
95
|
args.handled = true;
|
|
96
96
|
this.lastPoint = args.mousePoint;
|
|
97
|
-
args.target.setPointerCapture(args.pointerId);
|
|
98
97
|
};
|
|
99
98
|
/** @inheritDoc */
|
|
100
99
|
ZoomPanModifier.prototype.modifierMouseMove = function (args) {
|
|
@@ -131,7 +130,6 @@ var ZoomPanModifier = /** @class */ (function (_super) {
|
|
|
131
130
|
ZoomPanModifier.prototype.modifierMouseUp = function (args) {
|
|
132
131
|
_super.prototype.modifierMouseUp.call(this, args);
|
|
133
132
|
this.lastPoint = undefined;
|
|
134
|
-
args.target.releasePointerCapture(args.pointerId);
|
|
135
133
|
this.activeTouchEvents.delete(args.pointerId);
|
|
136
134
|
// delegate drag and pan handling to the next active pointer in order of event occurrence
|
|
137
135
|
if (this.activeTouchEvents.size > 0) {
|
|
@@ -144,7 +142,6 @@ var ZoomPanModifier = /** @class */ (function (_super) {
|
|
|
144
142
|
ZoomPanModifier.prototype.modifierPointerCancel = function (args) {
|
|
145
143
|
_super.prototype.modifierPointerCancel.call(this, args);
|
|
146
144
|
this.lastPoint = undefined;
|
|
147
|
-
args.target.releasePointerCapture(args.pointerId);
|
|
148
145
|
this.activeTouchEvents.clear();
|
|
149
146
|
};
|
|
150
147
|
/** @inheritDoc */
|
|
@@ -39,6 +39,9 @@ var BandSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
39
39
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
40
40
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
41
41
|
var dataSeries = this.parentSeries.dataSeries;
|
|
42
|
+
if (!dataSeries) {
|
|
43
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
44
|
+
}
|
|
42
45
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
43
46
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
44
47
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
@@ -68,6 +71,9 @@ var BandSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
68
71
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
69
72
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
70
73
|
var dataSeries = this.parentSeries.dataSeries;
|
|
74
|
+
if (!dataSeries) {
|
|
75
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
76
|
+
}
|
|
71
77
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXyyPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries, xHitCoord, yHitCoord);
|
|
72
78
|
var hitTestInfo = hitTestHelpers_1.hitTestHelpers.createHitTestInfo(this.parentSeries, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, dataSeries, dataSeries.getNativeXValues(), dataSeries.getNativeYValues(), xHitCoord, yHitCoord, nearestPointIndex, hitTestRadius);
|
|
73
79
|
if (nearestPointIndex >= 0) {
|
|
@@ -94,6 +100,9 @@ var BandSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
94
100
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
95
101
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
96
102
|
var dataSeries = this.parentSeries.dataSeries;
|
|
103
|
+
if (!dataSeries) {
|
|
104
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
105
|
+
}
|
|
97
106
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
98
107
|
var hitTestInfo = hitTestHelpers_1.hitTestHelpers.createHitTestInfo(this.parentSeries, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, dataSeries, dataSeries.getNativeXValues(), dataSeries.getNativeYValues(), xHitCoord, yHitCoord, nearestPointIndex, 0);
|
|
99
108
|
if (nearestPointIndex >= 0) {
|
|
@@ -40,6 +40,9 @@ var BaseHitTestProvider = /** @class */ (function () {
|
|
|
40
40
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
41
41
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
42
42
|
var dataSeries = this.parentSeries.dataSeries;
|
|
43
|
+
if (!dataSeries) {
|
|
44
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
45
|
+
}
|
|
43
46
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXyPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries, xHitCoord, yHitCoord);
|
|
44
47
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
45
48
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
@@ -71,6 +74,9 @@ var BaseHitTestProvider = /** @class */ (function () {
|
|
|
71
74
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
72
75
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
73
76
|
var dataSeries = this.parentSeries.dataSeries;
|
|
77
|
+
if (!dataSeries) {
|
|
78
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
79
|
+
}
|
|
74
80
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
75
81
|
var hitTestInfo = hitTestHelpers_1.hitTestHelpers.createHitTestInfo(this.parentSeries, xCoordinateCalculator, yCoordinateCalculator, isVerticalChart, dataSeries, dataSeries.getNativeXValues(), dataSeries.getNativeYValues(), xHitCoord, yHitCoord, nearestPointIndex, 0);
|
|
76
82
|
hitTestInfo.isHit = hitTestInfo.isWithinDataBounds;
|
|
@@ -42,6 +42,9 @@ var BubbleSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
42
42
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
43
43
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
44
44
|
var dataSeries = this.parentSeries.dataSeries;
|
|
45
|
+
if (!dataSeries) {
|
|
46
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
47
|
+
}
|
|
45
48
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXyPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries, xHitCoord, yHitCoord);
|
|
46
49
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
47
50
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
@@ -86,6 +89,9 @@ var BubbleSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
86
89
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
87
90
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
88
91
|
var dataSeries = this.parentSeries.dataSeries;
|
|
92
|
+
if (!dataSeries) {
|
|
93
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
94
|
+
}
|
|
89
95
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
90
96
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
91
97
|
var zNativeValues = dataSeries.getNativeZValues();
|
|
@@ -40,6 +40,9 @@ var ColumnSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
40
40
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
41
41
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
42
42
|
var dataSeries = this.parentSeries.dataSeries;
|
|
43
|
+
if (!dataSeries) {
|
|
44
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
45
|
+
}
|
|
43
46
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
44
47
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
45
48
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
@@ -71,6 +74,9 @@ var ColumnSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
71
74
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
72
75
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
73
76
|
var dataSeries = this.parentSeries.dataSeries;
|
|
77
|
+
if (!dataSeries) {
|
|
78
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
79
|
+
}
|
|
74
80
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
75
81
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
76
82
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
@@ -42,6 +42,9 @@ var ErrorSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
42
42
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
43
43
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
44
44
|
var dataSeries = this.parentSeries.dataSeries;
|
|
45
|
+
if (!dataSeries) {
|
|
46
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
47
|
+
}
|
|
45
48
|
// TODO handle horizontal direction
|
|
46
49
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
47
50
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
@@ -77,6 +80,9 @@ var ErrorSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
77
80
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
78
81
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
79
82
|
var dataSeries = this.parentSeries.dataSeries;
|
|
83
|
+
if (!dataSeries) {
|
|
84
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
85
|
+
}
|
|
80
86
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
81
87
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
82
88
|
var lowNativeValues = dataSeries.getNativeLowValues();
|
|
@@ -42,6 +42,9 @@ var ImpulseSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
42
42
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
43
43
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
44
44
|
var dataSeries = this.parentSeries.dataSeries;
|
|
45
|
+
if (!dataSeries) {
|
|
46
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
47
|
+
}
|
|
45
48
|
var nearestXyPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXyPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries, xHitCoord, yHitCoord);
|
|
46
49
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
47
50
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
@@ -77,6 +80,9 @@ var ImpulseSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
77
80
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
78
81
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
79
82
|
var dataSeries = this.parentSeries.dataSeries;
|
|
83
|
+
if (!dataSeries) {
|
|
84
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
85
|
+
}
|
|
80
86
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
81
87
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
82
88
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
@@ -51,6 +51,9 @@ var LineSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
51
51
|
LineSeriesHitTestProvider.prototype.hitTestSorted = function (xHitCoord, yHitCoord, hitTestRadius) {
|
|
52
52
|
var _a = this.currentRenderPassData, xCoordinateCalculator = _a.xCoordinateCalculator, yCoordinateCalculator = _a.yCoordinateCalculator, isVerticalChart = _a.isVerticalChart;
|
|
53
53
|
var dataSeries = this.parentSeries.dataSeries;
|
|
54
|
+
if (!dataSeries) {
|
|
55
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
56
|
+
}
|
|
54
57
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
55
58
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
56
59
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
@@ -81,6 +84,9 @@ var LineSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
81
84
|
LineSeriesHitTestProvider.prototype.hitTestUnsorted = function (xHitCoord, yHitCoord, hitTestRadius) {
|
|
82
85
|
var _a = this.currentRenderPassData, xCoordinateCalculator = _a.xCoordinateCalculator, yCoordinateCalculator = _a.yCoordinateCalculator, isVerticalChart = _a.isVerticalChart;
|
|
83
86
|
var dataSeries = this.parentSeries.dataSeries;
|
|
87
|
+
if (!dataSeries) {
|
|
88
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
89
|
+
}
|
|
84
90
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXyPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries, xHitCoord, yHitCoord);
|
|
85
91
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
86
92
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
@@ -40,6 +40,9 @@ var MountainSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
40
40
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
41
41
|
var renderableSeries = this.parentSeries;
|
|
42
42
|
var dataSeries = renderableSeries.dataSeries;
|
|
43
|
+
if (!dataSeries) {
|
|
44
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
45
|
+
}
|
|
43
46
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
44
47
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
45
48
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
@@ -42,6 +42,9 @@ var OhlcSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
42
42
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
43
43
|
var renderableSeries = this.parentSeries;
|
|
44
44
|
var dataSeries = this.parentSeries.dataSeries;
|
|
45
|
+
if (!dataSeries) {
|
|
46
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
47
|
+
}
|
|
45
48
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
46
49
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
47
50
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
@@ -78,6 +81,9 @@ var OhlcSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
78
81
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
79
82
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
80
83
|
var dataSeries = this.parentSeries.dataSeries;
|
|
84
|
+
if (!dataSeries) {
|
|
85
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
86
|
+
}
|
|
81
87
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
82
88
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
83
89
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
@@ -41,6 +41,9 @@ var ScatterSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
41
41
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
42
42
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
43
43
|
var dataSeries = this.parentSeries.dataSeries;
|
|
44
|
+
if (!dataSeries) {
|
|
45
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
46
|
+
}
|
|
44
47
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXyPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries, xHitCoord, yHitCoord);
|
|
45
48
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
46
49
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
@@ -72,6 +75,9 @@ var ScatterSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
72
75
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
73
76
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
74
77
|
var dataSeries = this.parentSeries.dataSeries;
|
|
78
|
+
if (!dataSeries) {
|
|
79
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
80
|
+
}
|
|
75
81
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
76
82
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
77
83
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
@@ -40,6 +40,9 @@ var StackedColumnSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
40
40
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
41
41
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
42
42
|
var dataSeries = this.parentSeries.dataSeries;
|
|
43
|
+
if (!dataSeries) {
|
|
44
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
45
|
+
}
|
|
43
46
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
44
47
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
45
48
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
@@ -98,6 +101,9 @@ var StackedColumnSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
98
101
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
99
102
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
100
103
|
var dataSeries = this.parentSeries.dataSeries;
|
|
104
|
+
if (!dataSeries) {
|
|
105
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
106
|
+
}
|
|
101
107
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
102
108
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
103
109
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
@@ -39,6 +39,9 @@ var StackedMountainSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
39
39
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
40
40
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
41
41
|
var dataSeries = this.parentSeries.dataSeries;
|
|
42
|
+
if (!dataSeries) {
|
|
43
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
44
|
+
}
|
|
42
45
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
43
46
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
44
47
|
var accumulatedValues = this.parentSeries.accumulatedValues;
|
|
@@ -69,6 +72,9 @@ var StackedMountainSeriesHitTestProvider = /** @class */ (function (_super) {
|
|
|
69
72
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
70
73
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
71
74
|
var dataSeries = this.parentSeries.dataSeries;
|
|
75
|
+
if (!dataSeries) {
|
|
76
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
77
|
+
}
|
|
72
78
|
var nearestPointIndex = hitTestHelpers_1.hitTestHelpers.getNearestXPoint(this.webAssemblyContext, xCoordinateCalculator, dataSeries, xHitCoord, dataSeries.dataDistributionCalculator.isSortedAscending);
|
|
73
79
|
var xNativeValues = dataSeries.getNativeXValues();
|
|
74
80
|
var yNativeValues = dataSeries.getNativeYValues();
|
|
@@ -40,6 +40,9 @@ var UniformHeatmapHitTestProvider = /** @class */ (function (_super) {
|
|
|
40
40
|
var xHitCoord = isVerticalChart ? hitTestPoint.y : hitTestPoint.x;
|
|
41
41
|
var yHitCoord = isVerticalChart ? hitTestPoint.x : hitTestPoint.y;
|
|
42
42
|
var dataSeries = this.parentSeries.dataSeries;
|
|
43
|
+
if (!dataSeries) {
|
|
44
|
+
return HitTestInfo_1.HitTestInfo.empty();
|
|
45
|
+
}
|
|
43
46
|
var heatmapPoint = hitTestHelpers_1.hitTestHelpers.getNearestHeatmapPoint(xCoordinateCalculator, yCoordinateCalculator, dataSeries, xHitCoord, yHitCoord);
|
|
44
47
|
var xIndex = heatmapPoint.xIndex, yIndex = heatmapPoint.yIndex, zValue = heatmapPoint.zValue;
|
|
45
48
|
var hitTestInfo = new HitTestInfo_1.HitTestInfo(this.parentSeries);
|
package/Core/BuildStamp.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TSciChart } from "../types/TSciChart";
|
|
2
2
|
import { TSciChart3D } from "../types/TSciChart3D";
|
|
3
|
-
export declare const libraryVersion = "2.2.
|
|
3
|
+
export declare const libraryVersion = "2.2.2411";
|
|
4
4
|
export declare const checkBuildStamp: (wasmContext: TSciChart | TSciChart3D) => boolean;
|
package/Core/BuildStamp.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.checkBuildStamp = exports.libraryVersion = void 0;
|
|
4
|
-
var buildStamp = "2022-
|
|
4
|
+
var buildStamp = "2022-08-25T00:00:00";
|
|
5
5
|
var result;
|
|
6
6
|
// tslint:disable-next-line:no-var-requires
|
|
7
|
-
exports.libraryVersion = "2.2.
|
|
7
|
+
exports.libraryVersion = "2.2.2411";
|
|
8
8
|
var checkBuildStamp = function (wasmContext) {
|
|
9
9
|
if (result !== undefined)
|
|
10
10
|
return result;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MouseManager = void 0;
|
|
4
4
|
var ModifierMouseArgs_1 = require("../../Charting/ChartModifiers/ModifierMouseArgs");
|
|
5
5
|
var SciChartSurfaceBase_1 = require("../../Charting/Visuals/SciChartSurfaceBase");
|
|
6
|
-
var ExecuteOn_1 = require("../../types/ExecuteOn");
|
|
7
6
|
var array_1 = require("../../utils/array");
|
|
8
7
|
var Guard_1 = require("../Guard");
|
|
9
8
|
/**
|
|
@@ -82,10 +81,8 @@ var MouseManager = /** @class */ (function () {
|
|
|
82
81
|
* @param event The {@link PointerEvent}
|
|
83
82
|
*/
|
|
84
83
|
MouseManager.prototype.onPointerDown = function (event) {
|
|
85
|
-
// prevent
|
|
86
|
-
|
|
87
|
-
event.preventDefault();
|
|
88
|
-
}
|
|
84
|
+
// To prevent default browser actions (like fast scroll for mouse wheel click and dragging of selected elements)
|
|
85
|
+
// call args.nativeEvent.preventDefault() in the chart modifier instead of calling event.preventDefault() here
|
|
89
86
|
var modifierEvent = ModifierMouseArgs_1.ModifierMouseArgs.fromPointerEvent(event);
|
|
90
87
|
this.modifierMouseDown(modifierEvent);
|
|
91
88
|
};
|
|
@@ -142,6 +139,9 @@ var MouseManager = /** @class */ (function () {
|
|
|
142
139
|
};
|
|
143
140
|
MouseManager.prototype.modifierPointerCancel = function (args) {
|
|
144
141
|
var _this = this;
|
|
142
|
+
if (args.isMaster) {
|
|
143
|
+
args.target.releasePointerCapture(args.pointerId);
|
|
144
|
+
}
|
|
145
145
|
this.chartModifiers.forEach(function (cm) {
|
|
146
146
|
if (cm.canReceiveMouseEvents && (!args.handled || cm.receiveHandledEvents)) {
|
|
147
147
|
if (args.isMaster || (!args.isMaster && cm.modifierGroup === args.modifierGroup)) {
|
|
@@ -200,6 +200,11 @@ var MouseManager = /** @class */ (function () {
|
|
|
200
200
|
*/
|
|
201
201
|
MouseManager.prototype.modifierMouseDown = function (args) {
|
|
202
202
|
var _this = this;
|
|
203
|
+
var _a;
|
|
204
|
+
// allow capturing mouse events outside when pointer is of canvas
|
|
205
|
+
if (args.isMaster) {
|
|
206
|
+
(_a = args.target) === null || _a === void 0 ? void 0 : _a.setPointerCapture(args.pointerId);
|
|
207
|
+
}
|
|
203
208
|
var updateModifiers = function () {
|
|
204
209
|
_this.chartModifiers.forEach(function (cm) {
|
|
205
210
|
if (cm.canReceiveMouseEvents && (!args.handled || cm.receiveHandledEvents)) {
|
|
@@ -255,6 +260,10 @@ var MouseManager = /** @class */ (function () {
|
|
|
255
260
|
*/
|
|
256
261
|
MouseManager.prototype.modifierMouseUp = function (args) {
|
|
257
262
|
var _this = this;
|
|
263
|
+
var _a;
|
|
264
|
+
if (args.isMaster) {
|
|
265
|
+
(_a = args.target) === null || _a === void 0 ? void 0 : _a.releasePointerCapture(args.pointerId);
|
|
266
|
+
}
|
|
258
267
|
// Annotation Adorners
|
|
259
268
|
if (this.sciChartSurface.surfaceType === SciChartSurfaceBase_1.ESurfaceType.SciChartSurfaceType) {
|
|
260
269
|
var scs = this.sciChartSurface;
|