scichart 2.2.2393 → 2.2.2396
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 +1 -1
- package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +2 -0
- package/Charting/Visuals/Annotations/BoxAnnotation.js +49 -1
- package/Charting/Visuals/SciChartSurface.d.ts +1 -1
- package/Charting/Visuals/SciChartSurface.js +4 -3
- package/Charting/Visuals/SciChartSurfaceBase.d.ts +1 -1
- package/Charting/Visuals/SciChartSurfaceBase.js +2 -1
- package/Charting/Visuals/createMaster.js +1 -1
- package/Charting/Visuals/licenseManager2D.js +3 -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 +1 -1
- package/_wasm/scichart3d.wasm +0 -0
- package/package.json +1 -1
|
@@ -102,6 +102,7 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
102
102
|
if (this.sciChartSurface.isDeleted) {
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
|
+
// console.log("render");
|
|
105
106
|
var nativeContext = renderContext.getNativeContext();
|
|
106
107
|
var wasmContext = this.sciChartSurface.webAssemblyContext2D;
|
|
107
108
|
var oldBlendMode = nativeContext.GetBlendMode();
|
|
@@ -110,7 +111,6 @@ var SciChartRenderer = /** @class */ (function () {
|
|
|
110
111
|
this.validate();
|
|
111
112
|
// Animation Step
|
|
112
113
|
var timeElapsed = this.previousTime ? Date.now() - this.previousTime : undefined;
|
|
113
|
-
// console.log("draw ", timeElapsed);
|
|
114
114
|
this.previousTime = Date.now();
|
|
115
115
|
this.sciChartSurface.onAnimate(timeElapsed);
|
|
116
116
|
this.sciChartSurface.updateBackground();
|
|
@@ -44,6 +44,7 @@ export declare class BoxAnnotation extends RenderContextAnnotationBase {
|
|
|
44
44
|
private strokeThicknessProperty;
|
|
45
45
|
private strokeProperty;
|
|
46
46
|
private fillProperty;
|
|
47
|
+
private nativeDrawingProvider;
|
|
47
48
|
private strokePenCache;
|
|
48
49
|
private fillBrushCache;
|
|
49
50
|
/**
|
|
@@ -83,6 +84,7 @@ export declare class BoxAnnotation extends RenderContextAnnotationBase {
|
|
|
83
84
|
delete(): void;
|
|
84
85
|
/** @inheritDoc */
|
|
85
86
|
drawWithContext(renderContext: IRenderContext2D, xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase, viewRect: Rect): void;
|
|
87
|
+
private drawWithProvider;
|
|
86
88
|
/** @inheritDoc */
|
|
87
89
|
onAttach(scs: SciChartSurface): void;
|
|
88
90
|
onDragStarted(args: ModifierMouseArgs): boolean;
|
|
@@ -16,6 +16,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.BoxAnnotation = void 0;
|
|
19
|
+
var app_1 = require("../../../constants/app");
|
|
19
20
|
var Deleter_1 = require("../../../Core/Deleter");
|
|
20
21
|
var Guard_1 = require("../../../Core/Guard");
|
|
21
22
|
var Point_1 = require("../../../Core/Point");
|
|
@@ -119,6 +120,7 @@ var BoxAnnotation = /** @class */ (function (_super) {
|
|
|
119
120
|
BoxAnnotation.prototype.delete = function () {
|
|
120
121
|
this.strokePenCache = (0, Deleter_1.deleteSafe)(this.strokePenCache);
|
|
121
122
|
this.fillBrushCache = (0, Deleter_1.deleteSafe)(this.fillBrushCache);
|
|
123
|
+
this.nativeDrawingProvider = (0, Deleter_1.deleteSafe)(this.nativeDrawingProvider);
|
|
122
124
|
};
|
|
123
125
|
/** @inheritDoc */
|
|
124
126
|
BoxAnnotation.prototype.drawWithContext = function (renderContext, xCalc, yCalc, viewRect) {
|
|
@@ -135,12 +137,58 @@ var BoxAnnotation = /** @class */ (function (_super) {
|
|
|
135
137
|
var y2 = this.getY2Coordinate(xCalc, yCalc);
|
|
136
138
|
this.setAnnotationBorders(x1, x2, y1, y2);
|
|
137
139
|
var rect = Rect_1.Rect.createWithPoints(new Point_1.Point(x1, y1), new Point_1.Point(x2, y2));
|
|
138
|
-
|
|
140
|
+
// Temporary HAX! drawRect is rubbish with large strokeThickness, whereas the columnDrawingProvider does a nice
|
|
141
|
+
// outlined rectangle, but the code is ugly. In 2.3 we will improve the native drawRect to do the outline properly.
|
|
142
|
+
if (!app_1.IS_TEST_ENV) {
|
|
143
|
+
this.drawWithProvider(renderContext, strokePen.scrtPen, fillBrush.scrtBrush, xCalc, yCalc, rect, viewRect);
|
|
144
|
+
}
|
|
145
|
+
//renderContext.drawRect(rect, viewRect, strokePen, fillBrush);
|
|
139
146
|
this.updateAdornerInner();
|
|
140
147
|
};
|
|
148
|
+
BoxAnnotation.prototype.drawWithProvider = function (renderContext, linesPen, fillBrush, xCalc, yCalc, rect, viewRect) {
|
|
149
|
+
var webAssemblyContext = this.parentSurface.webAssemblyContext2D;
|
|
150
|
+
var args = new webAssemblyContext.SCRTColumnDrawingParams();
|
|
151
|
+
args.forceShaderMethod = true;
|
|
152
|
+
args.verticalChart = this.isVerticalChart;
|
|
153
|
+
args.zeroLineY = this.isVerticalChart ? yCalc.getDataValue(rect.left) : yCalc.getDataValue(rect.bottom);
|
|
154
|
+
args.columnWidth = this.isVerticalChart ? rect.height : rect.width;
|
|
155
|
+
// ISSUE: If the strokeThickness property is not provided,
|
|
156
|
+
// the fill will be disappeared with large zoom (when the column width will be small or zero)
|
|
157
|
+
// if (args.columnWidth === 0 && this.strokeThickness === 0) {
|
|
158
|
+
// strokePenCache = this.strokePenFillColoredCache;
|
|
159
|
+
// }
|
|
160
|
+
if (linesPen) {
|
|
161
|
+
args.SetLinesPen(linesPen);
|
|
162
|
+
}
|
|
163
|
+
if (fillBrush) {
|
|
164
|
+
args.SetFillBrush(fillBrush);
|
|
165
|
+
}
|
|
166
|
+
args.viewportWidth = viewRect.width;
|
|
167
|
+
args.viewportHeight = viewRect.height;
|
|
168
|
+
var xMid = this.isVerticalChart ? (rect.top + rect.bottom) / 2 : (rect.left + rect.right) / 2;
|
|
169
|
+
var xVal = xCalc.getDataValue(xMid);
|
|
170
|
+
var xValues = new webAssemblyContext.SCRTDoubleVector();
|
|
171
|
+
xValues.push_back(xVal);
|
|
172
|
+
var yVal = this.isVerticalChart ? yCalc.getDataValue(rect.right) : yCalc.getDataValue(rect.top);
|
|
173
|
+
var yValues = new webAssemblyContext.SCRTDoubleVector();
|
|
174
|
+
yValues.push_back(yVal);
|
|
175
|
+
args.count = yValues.size();
|
|
176
|
+
var nativeContext = renderContext.getNativeContext();
|
|
177
|
+
nativeContext.PushMatrix();
|
|
178
|
+
nativeContext.PushState();
|
|
179
|
+
nativeContext.Translate(viewRect.x, viewRect.y);
|
|
180
|
+
nativeContext.SetClipRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);
|
|
181
|
+
this.nativeDrawingProvider.DrawPointsVec(nativeContext, xValues, yValues, xCalc.nativeCalculator, yCalc.nativeCalculator, args);
|
|
182
|
+
nativeContext.PopMatrix();
|
|
183
|
+
nativeContext.PopState();
|
|
184
|
+
xValues.delete();
|
|
185
|
+
yValues.delete();
|
|
186
|
+
args.delete();
|
|
187
|
+
};
|
|
141
188
|
/** @inheritDoc */
|
|
142
189
|
BoxAnnotation.prototype.onAttach = function (scs) {
|
|
143
190
|
_super.prototype.onAttach.call(this, scs);
|
|
191
|
+
this.nativeDrawingProvider = new scs.webAssemblyContext2D.SCRTColumnSeriesDrawingProvider();
|
|
144
192
|
if (!this.strokePenCache) {
|
|
145
193
|
this.strokePenCache = new Pen2DCache_1.Pen2DCache(scs.webAssemblyContext2D);
|
|
146
194
|
}
|
|
@@ -397,7 +397,7 @@ var SciChartSurface = /** @class */ (function (_super) {
|
|
|
397
397
|
// Logger.log("SciChartSurface.isSuspended = true. Ignoring invalidateElement() call");
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
|
-
// console.
|
|
400
|
+
// console.trace("Invalidating ", this.domChartRoot.id);
|
|
401
401
|
var canvasId = this.domCanvas2D ? this.domCanvas2D.id : "undefinedCanvasId";
|
|
402
402
|
this.renderSurface.invalidateElement(canvasId);
|
|
403
403
|
};
|
|
@@ -415,7 +415,8 @@ var SciChartSurface = /** @class */ (function (_super) {
|
|
|
415
415
|
/**
|
|
416
416
|
* @inheritDoc
|
|
417
417
|
*/
|
|
418
|
-
SciChartSurface.prototype.delete = function () {
|
|
418
|
+
SciChartSurface.prototype.delete = function (clearHtml) {
|
|
419
|
+
if (clearHtml === void 0) { clearHtml = true; }
|
|
419
420
|
_super.prototype.delete.call(this);
|
|
420
421
|
this.renderableSeries.asArray().forEach(function (rs) { return rs.delete(); });
|
|
421
422
|
this.renderableSeries.clear();
|
|
@@ -428,7 +429,7 @@ var SciChartSurface = /** @class */ (function (_super) {
|
|
|
428
429
|
this.watermarkProperties = (0, Deleter_1.deleteSafe)(this.watermarkProperties);
|
|
429
430
|
this.watermarkPropertyPosition = (0, Deleter_1.deleteSafe)(this.watermarkPropertyPosition);
|
|
430
431
|
this.chartModifiers.asArray().forEach(function (chm) { return chm.delete(); });
|
|
431
|
-
if (this.domChartRoot) {
|
|
432
|
+
if (clearHtml && this.domChartRoot) {
|
|
432
433
|
var style = this.domChartRoot.style;
|
|
433
434
|
if (style) {
|
|
434
435
|
style.background = "";
|
|
@@ -259,7 +259,7 @@ export declare abstract class SciChartSurfaceBase implements ISciChartSurfaceBas
|
|
|
259
259
|
/**
|
|
260
260
|
* @inheritDoc
|
|
261
261
|
*/
|
|
262
|
-
delete(): void;
|
|
262
|
+
delete(clearHtml?: boolean): void;
|
|
263
263
|
addDeletable(deletable: IDeletable): void;
|
|
264
264
|
/**
|
|
265
265
|
* Call invalidateElement() to trigger a redraw of the {@link SciChartSurfaceBase}. SciChart's WebGL WebAssembly rendering
|
|
@@ -286,9 +286,10 @@ var SciChartSurfaceBase = /** @class */ (function () {
|
|
|
286
286
|
/**
|
|
287
287
|
* @inheritDoc
|
|
288
288
|
*/
|
|
289
|
-
SciChartSurfaceBase.prototype.delete = function () {
|
|
289
|
+
SciChartSurfaceBase.prototype.delete = function (clearHtml) {
|
|
290
290
|
var _this = this;
|
|
291
291
|
var _a;
|
|
292
|
+
if (clearHtml === void 0) { clearHtml = true; }
|
|
292
293
|
this.isDeletedProperty = true;
|
|
293
294
|
var currentSurfaceIndex = (_a = this.destinations) === null || _a === void 0 ? void 0 : _a.findIndex(function (dest) { return dest.sciChartSurface === _this; });
|
|
294
295
|
if (currentSurfaceIndex >= 0) {
|
|
@@ -171,7 +171,7 @@ var createMaster = function () {
|
|
|
171
171
|
Guard_1.Guard.notNull(theme, "theme");
|
|
172
172
|
var canvas2dId = sciChartInitCommon_1.default.getCanvas2dId(divElementId);
|
|
173
173
|
var sameIdDestinations = exports.sciChartDestinations.filter(function (el) { return el.canvasElementId === canvas2dId; });
|
|
174
|
-
sameIdDestinations.forEach(function (el) { return el.sciChartSurface.delete(); });
|
|
174
|
+
sameIdDestinations.forEach(function (el) { return el.sciChartSurface.delete(false); });
|
|
175
175
|
var otherDestinations = exports.sciChartDestinations.filter(function (el) { return el.canvasElementId !== canvas2dId; });
|
|
176
176
|
chartInitObj.ClearDestinations();
|
|
177
177
|
while (exports.sciChartDestinations.length > 0) {
|
|
@@ -415,7 +415,9 @@ var applyLicense = function (licenseContext) {
|
|
|
415
415
|
var licenseKey = "";
|
|
416
416
|
var lt = licenseContext.SCRTCredentials.GetLicenseType();
|
|
417
417
|
debug("Initial license status is " + licensingClasses_1.LicenseType[convertLicenseType(lt, licenseContext)]);
|
|
418
|
-
if (window.location.hostname.includes(".csb.app") ||
|
|
418
|
+
if (window.location.hostname.includes(".csb.app") ||
|
|
419
|
+
window.location.hostname === "codesandbox.io" ||
|
|
420
|
+
window.location.hostname.includes(".codesandbox.io")) {
|
|
419
421
|
runtimeLicenseKey = "csb";
|
|
420
422
|
}
|
|
421
423
|
// Get from global store
|
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.2396";
|
|
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-06-
|
|
4
|
+
var buildStamp = "2022-06-29T00: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.2396";
|
|
8
8
|
var checkBuildStamp = function (wasmContext) {
|
|
9
9
|
if (result !== undefined)
|
|
10
10
|
return result;
|