scichart 3.0.301 → 3.0.317
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/Services/SciChartRenderer.js +6 -1
- package/Charting/Visuals/Annotations/AnnotationBase.d.ts +12 -1
- package/Charting/Visuals/Annotations/AnnotationBase.js +25 -2
- package/Charting/Visuals/Annotations/BoxAnnotation.js +1 -1
- package/Charting/Visuals/Axis/AxisRenderer.d.ts +0 -1
- package/Charting/Visuals/Axis/AxisRenderer.js +5 -5
- package/Charting/Visuals/SciChartSurface.js +1 -1
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +1 -1
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +16 -16
- package/_wasm/scichart3d.wasm +0 -0
- package/index.min.js +1 -1
- package/package.json +1 -1
- package/utils/imageUtil.js +1 -0
|
@@ -180,7 +180,12 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
180
180
|
});
|
|
181
181
|
this.drawSvgAnnotations(svgAnnotations, xAxesById, yAxesById, this.sciChartSurface.getCoordSvgTranslation());
|
|
182
182
|
// Update watermark
|
|
183
|
-
this.
|
|
183
|
+
if (!this.sciChartSurface.isSubSurface) {
|
|
184
|
+
this.updateWatermark(renderContext, seriesViewRect);
|
|
185
|
+
}
|
|
186
|
+
else if (renderContext.doDraw) {
|
|
187
|
+
this.updateWatermark(renderContext, this.sciChartSurface.parentSurface.seriesViewRect);
|
|
188
|
+
}
|
|
184
189
|
// Step 10 Call OnParentSurfaceRendered
|
|
185
190
|
this.onParentSurfaceRendered();
|
|
186
191
|
if (!app_1.IS_TEST_ENV) {
|
|
@@ -10,6 +10,9 @@ import { AnnotationClickEventArgs } from "./AnnotationClickEventArgs";
|
|
|
10
10
|
import { AnnotationDragDeltaEventArgs } from "./AnnotationDragDeltaEventArgs";
|
|
11
11
|
import { IAdornerProvider } from "./IAdornerProvider";
|
|
12
12
|
import { EAnnotationLayer, EAnnotationType, IAnnotation } from "./IAnnotation";
|
|
13
|
+
/**
|
|
14
|
+
* Defines possible parts of an annotation which could be interacted with a cursor to do dragging or resizing
|
|
15
|
+
*/
|
|
13
16
|
export declare enum EDraggingGripPoint {
|
|
14
17
|
/** x1,y1 */
|
|
15
18
|
x1y1 = "x1y1",
|
|
@@ -232,9 +235,9 @@ export declare abstract class AnnotationBase implements IAnnotation, IAdornerPro
|
|
|
232
235
|
readonly isSvgAnnotation: boolean;
|
|
233
236
|
/** @inheritDoc */
|
|
234
237
|
invalidateParentCallback: () => void;
|
|
235
|
-
adornerDraggingPoint: EDraggingGripPoint;
|
|
236
238
|
selectedChanged: EventHandler<boolean>;
|
|
237
239
|
clicked: EventHandler<AnnotationClickEventArgs>;
|
|
240
|
+
protected adornerDraggingPointProperty: EDraggingGripPoint;
|
|
238
241
|
protected svgAdorner: SVGElement;
|
|
239
242
|
protected prevIsSelected: boolean;
|
|
240
243
|
/** the annotation absolute coordinates */
|
|
@@ -277,6 +280,14 @@ export declare abstract class AnnotationBase implements IAnnotation, IAdornerPro
|
|
|
277
280
|
get annotationLayer(): EAnnotationLayer;
|
|
278
281
|
/** @inheritDoc */
|
|
279
282
|
set annotationLayer(annotationCanvas: EAnnotationLayer);
|
|
283
|
+
/**
|
|
284
|
+
* Gets or sets current {@link EDraggingGripPoint}
|
|
285
|
+
*/
|
|
286
|
+
get adornerDraggingPoint(): EDraggingGripPoint;
|
|
287
|
+
/**
|
|
288
|
+
* Gets or sets current {@link EDraggingGripPoint}
|
|
289
|
+
*/
|
|
290
|
+
protected set adornerDraggingPoint(value: EDraggingGripPoint);
|
|
280
291
|
/** @inheritDoc */
|
|
281
292
|
get parentSurface(): SciChartSurface;
|
|
282
293
|
/** @inheritDoc */
|
|
@@ -16,6 +16,9 @@ var AnnotationClickEventArgs_1 = require("./AnnotationClickEventArgs");
|
|
|
16
16
|
var AnnotationDragDeltaEventArgs_1 = require("./AnnotationDragDeltaEventArgs");
|
|
17
17
|
var constants_1 = require("./constants");
|
|
18
18
|
var IAnnotation_1 = require("./IAnnotation");
|
|
19
|
+
/**
|
|
20
|
+
* Defines possible parts of an annotation which could be interacted with a cursor to do dragging or resizing
|
|
21
|
+
*/
|
|
19
22
|
var EDraggingGripPoint;
|
|
20
23
|
(function (EDraggingGripPoint) {
|
|
21
24
|
/** x1,y1 */
|
|
@@ -177,6 +180,28 @@ var AnnotationBase = /** @class */ (function () {
|
|
|
177
180
|
enumerable: false,
|
|
178
181
|
configurable: true
|
|
179
182
|
});
|
|
183
|
+
Object.defineProperty(AnnotationBase.prototype, "adornerDraggingPoint", {
|
|
184
|
+
/**
|
|
185
|
+
* Gets or sets current {@link EDraggingGripPoint}
|
|
186
|
+
*/
|
|
187
|
+
get: function () {
|
|
188
|
+
return this.adornerDraggingPointProperty;
|
|
189
|
+
},
|
|
190
|
+
/**
|
|
191
|
+
* Gets or sets current {@link EDraggingGripPoint}
|
|
192
|
+
*/
|
|
193
|
+
set: function (value) {
|
|
194
|
+
var _a;
|
|
195
|
+
if (this.adornerDraggingPointProperty !== value) {
|
|
196
|
+
this.adornerDraggingPointProperty = value;
|
|
197
|
+
if (value) {
|
|
198
|
+
(_a = this.dragStarted) === null || _a === void 0 ? void 0 : _a.raiseEvent();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
enumerable: false,
|
|
203
|
+
configurable: true
|
|
204
|
+
});
|
|
180
205
|
Object.defineProperty(AnnotationBase.prototype, "parentSurface", {
|
|
181
206
|
/** @inheritDoc */
|
|
182
207
|
get: function () {
|
|
@@ -563,8 +588,6 @@ var AnnotationBase = /** @class */ (function () {
|
|
|
563
588
|
};
|
|
564
589
|
AnnotationBase.prototype.calcDragDistance = function (xyPoint) { };
|
|
565
590
|
AnnotationBase.prototype.onDragStarted = function (args) {
|
|
566
|
-
var _a;
|
|
567
|
-
(_a = this.dragStarted) === null || _a === void 0 ? void 0 : _a.raiseEvent();
|
|
568
591
|
return false;
|
|
569
592
|
};
|
|
570
593
|
AnnotationBase.prototype.checkIsClickedOnAnnotation = function (x, y) {
|
|
@@ -166,7 +166,7 @@ var BoxAnnotation = /** @class */ (function (_super) {
|
|
|
166
166
|
_super.prototype.onDragStarted.call(this, args);
|
|
167
167
|
var _a = this.getAnnotationBorders(false, true), x1 = _a.x1, x2 = _a.x2, y1 = _a.y1, y2 = _a.y2;
|
|
168
168
|
var _b = annotationHelpers_1.annotationHelpers.calcNewApex(x1, y1, x2, y2, this.isVerticalChart), x1y1 = _b.x1y1, x2y1 = _b.x2y1, x1y2 = _b.x1y2, x2y2 = _b.x2y2;
|
|
169
|
-
var xyMousePoint = (0, translate_1.translateFromCanvasToSeriesViewRect)(new Point_1.Point(args.mousePoint.x, args.mousePoint.y), this.parentSurface.seriesViewRect);
|
|
169
|
+
var xyMousePoint = (0, translate_1.translateFromCanvasToSeriesViewRect)(new Point_1.Point(args.mousePoint.x, args.mousePoint.y), this.parentSurface.seriesViewRect, true);
|
|
170
170
|
if (x1y1 && this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1)) {
|
|
171
171
|
var dist = (0, pointUtil_1.calcDistance)(x1y1.x, x1y1.y, xyMousePoint.x, xyMousePoint.y);
|
|
172
172
|
if (dist < this.annotationsGripsRadius * DpiHelper_1.DpiHelper.PIXEL_RATIO) {
|
|
@@ -25,7 +25,6 @@ export declare class AxisRenderer implements IDeletable {
|
|
|
25
25
|
private measureTextCanvas;
|
|
26
26
|
private keepLabelsWithinAxisProperty;
|
|
27
27
|
private hideOverlappingLabelsProperty;
|
|
28
|
-
private vertices;
|
|
29
28
|
/**
|
|
30
29
|
* Creates an instance of a {@link AxisRenderer}
|
|
31
30
|
* @param webAssemblyContext The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and
|
|
@@ -46,7 +46,6 @@ var AxisRenderer = /** @class */ (function () {
|
|
|
46
46
|
this.hideOverlappingLabelsProperty = true;
|
|
47
47
|
this.webAssemblyContext = webAssemblyContext;
|
|
48
48
|
this.textureManager = new TextureManager_1.TextureManager(webAssemblyContext);
|
|
49
|
-
this.vertices = (0, NativeObject_1.getVectorColorVertex)(webAssemblyContext);
|
|
50
49
|
if (!app_1.IS_TEST_ENV) {
|
|
51
50
|
this.measureTextCanvas = document.createElement("canvas");
|
|
52
51
|
this.measureTextCanvas.width = 1;
|
|
@@ -389,7 +388,8 @@ var AxisRenderer = /** @class */ (function () {
|
|
|
389
388
|
return;
|
|
390
389
|
var viewRect = this.viewRect;
|
|
391
390
|
var tickSize = tickStyle.tickSize;
|
|
392
|
-
|
|
391
|
+
var vertices = (0, NativeObject_1.getVectorColorVertex)(this.webAssemblyContext);
|
|
392
|
+
vertices.clear();
|
|
393
393
|
var isHorizontal = (0, AxisAlignment_1.getIsHorizontal)(axisAlignment);
|
|
394
394
|
if (isHorizontal === undefined) {
|
|
395
395
|
return;
|
|
@@ -425,13 +425,13 @@ var AxisRenderer = /** @class */ (function () {
|
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
var vertex = (0, NativeObject_1.getVertex)(_this.webAssemblyContext, x1, y1);
|
|
428
|
-
|
|
428
|
+
vertices.push_back(vertex);
|
|
429
429
|
var vertex2 = (0, NativeObject_1.getVertex)(_this.webAssemblyContext, x2, y2);
|
|
430
|
-
|
|
430
|
+
vertices.push_back(vertex2);
|
|
431
431
|
});
|
|
432
432
|
var leftOffset = viewRect.left - (isHorizontal ? axisOffset : 0);
|
|
433
433
|
var topOffset = viewRect.top - (isHorizontal ? 0 : axisOffset);
|
|
434
|
-
renderContext.drawLinesNative(
|
|
434
|
+
renderContext.drawLinesNative(vertices, pen, WebGlRenderContext2D_1.ELineDrawMode.DiscontinuousLine, leftOffset, topOffset);
|
|
435
435
|
};
|
|
436
436
|
/**
|
|
437
437
|
* Called internally - draws axis labels when needed, for example for line annotations
|
|
@@ -630,7 +630,7 @@ var SciChartSurface = /** @class */ (function (_super) {
|
|
|
630
630
|
if (err.name === "BindingError") {
|
|
631
631
|
console.error(err);
|
|
632
632
|
console.warn("Binding errors can occur if a previous chart using the same div id was not deleted correctly, or if you try to share data or series between charts that use different webassembly contexts.");
|
|
633
|
-
(0, NativeObject_1.freeCache)(this.webAssemblyContext2D);
|
|
633
|
+
(0, NativeObject_1.freeCache)(this.webAssemblyContext2D).delete();
|
|
634
634
|
}
|
|
635
635
|
else if (this.domChartRoot) {
|
|
636
636
|
console.error("Error from chart in div ".concat(this.domChartRoot.id), err);
|
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 = "3.0.
|
|
3
|
+
export declare const libraryVersion = "3.0.317";
|
|
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 = "2023-
|
|
4
|
+
var buildStamp = "2023-03-16T00:00:00";
|
|
5
5
|
var result;
|
|
6
6
|
// tslint:disable-next-line:no-var-requires
|
|
7
|
-
exports.libraryVersion = "3.0.
|
|
7
|
+
exports.libraryVersion = "3.0.317";
|
|
8
8
|
var checkBuildStamp = function (wasmContext) {
|
|
9
9
|
if (result !== undefined)
|
|
10
10
|
return result;
|