scichart 3.0.266 → 3.0.280
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/ChartModifierBase2D.js +2 -3
- package/Charting/ChartModifiers/CursorModifier.d.ts +27 -12
- package/Charting/ChartModifiers/CursorModifier.js +87 -12
- package/Charting/ChartModifiers/XAxisDragModifier.d.ts +15 -12
- package/Charting/ChartModifiers/YAxisDragModifier.d.ts +15 -12
- package/Charting/ChartModifiers/constants.d.ts +4 -1
- package/Charting/ChartModifiers/constants.js +3 -0
- package/Charting/Drawing/FontKey.d.ts +0 -0
- package/Charting/Drawing/FontKey.js +0 -0
- package/Charting/Drawing/WebGlRenderContext2D.d.ts +6 -2
- package/Charting/Drawing/WebGlRenderContext2D.js +16 -7
- package/Charting/LayoutManager/BaseAxisLayoutStrategy.d.ts +1 -0
- package/Charting/LayoutManager/BaseAxisLayoutStrategy.js +1 -0
- package/Charting/LayoutManager/BottomAlignedInnerAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/BottomAlignedOuterAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.d.ts +1 -0
- package/Charting/LayoutManager/BottomAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/LayoutManager.d.ts +14 -4
- package/Charting/LayoutManager/LayoutManager.js +105 -5
- package/Charting/LayoutManager/LeftAlignedInnerAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/LeftAlignedOuterAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.d.ts +1 -0
- package/Charting/LayoutManager/LeftAlignedOuterVerticallyStackedAxisLayoutStrategy.js +3 -3
- package/Charting/LayoutManager/RightAlignedInnerAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/RightAlignedOuterAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.d.ts +1 -0
- package/Charting/LayoutManager/RightAlignedOuterVerticallyStackedAxisLayoutStrategy.js +1 -1
- package/Charting/LayoutManager/TopAlignedInnerAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/TopAlignedOuterAxisLayoutStrategy.js +5 -0
- package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.d.ts +1 -0
- package/Charting/LayoutManager/TopAlignedOuterHorizontallyStackedAxisLayoutStrategy.js +1 -1
- package/Charting/Visuals/Annotations/AnnotationBase.d.ts +6 -6
- package/Charting/Visuals/Annotations/AnnotationBase.js +13 -9
- package/Charting/Visuals/Annotations/AxisMarkerAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/AxisMarkerAnnotation.js +7 -7
- package/Charting/Visuals/Annotations/BoxAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/BoxAnnotation.js +21 -21
- package/Charting/Visuals/Annotations/LineAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/LineAnnotation.js +4 -4
- package/Charting/Visuals/Annotations/NativeTextAnnotation.d.ts +1 -1
- package/Charting/Visuals/Annotations/NativeTextAnnotation.js +21 -21
- package/Charting/Visuals/Annotations/SvgAnnotationBase.d.ts +1 -1
- package/Charting/Visuals/Axis/AxisBase2D.d.ts +0 -5
- package/Charting/Visuals/Axis/AxisBase2D.js +13 -19
- package/Charting/Visuals/Axis/AxisCore.js +4 -1
- package/Charting/Visuals/Helpers/NativeObject.d.ts +6 -0
- package/Charting/Visuals/Helpers/NativeObject.js +21 -4
- package/Charting/Visuals/I2DSurfaceOptions.d.ts +1 -1
- package/Charting/Visuals/RenderableSeries/BaseRenderableSeries.js +14 -0
- package/Charting/Visuals/SciChartDefaults.d.ts +4 -0
- package/Charting/Visuals/SciChartDefaults.js +4 -0
- package/Charting/Visuals/SciChartSurface.d.ts +6 -2
- package/Charting/Visuals/SciChartSurface.js +10 -4
- package/Charting/Visuals/licenseManager2D.js +4 -2
- package/Core/BuildStamp.d.ts +1 -1
- package/Core/BuildStamp.js +2 -2
- package/Core/Telemetry.js +4 -1
- package/README.md +56 -14
- package/_wasm/scichart.browser.js +1 -1
- package/_wasm/scichart2d.js +10 -10
- package/_wasm/scichart2d.wasm +0 -0
- package/_wasm/scichart3d.js +10 -10
- package/_wasm/scichart3d.wasm +0 -0
- package/package.json +1 -1
- package/types/AxisAlignment.d.ts +1 -0
- package/types/AxisAlignment.js +5 -1
- package/types/TSciChart.d.ts +1 -0
- package/utils/array.d.ts +9 -0
- package/utils/array.js +19 -1
|
@@ -41,6 +41,11 @@ var LeftAlignedInnerAxisLayoutStrategy = /** @class */ (function (_super) {
|
|
|
41
41
|
chartLayoutState.leftInnerAreaSize = Math.max(chartLayoutState.leftInnerAreaSize, requiredSize);
|
|
42
42
|
};
|
|
43
43
|
LeftAlignedInnerAxisLayoutStrategy.prototype.layoutAxes = function (left, top, right, bottom, axes) {
|
|
44
|
+
// Set axisLength to default value which is seriesViewRect.height
|
|
45
|
+
axes.forEach(function (axis) {
|
|
46
|
+
axis.axisLength = undefined;
|
|
47
|
+
axis.offset = 0;
|
|
48
|
+
});
|
|
44
49
|
if (axes.length === 0) {
|
|
45
50
|
return;
|
|
46
51
|
}
|
|
@@ -43,6 +43,11 @@ var LeftAlignedOuterAxisLayoutStrategy = /** @class */ (function (_super) {
|
|
|
43
43
|
chartLayoutState.leftOuterAreaSize = Math.max(chartLayoutState.leftOuterAreaSize, requiredSize);
|
|
44
44
|
};
|
|
45
45
|
LeftAlignedOuterAxisLayoutStrategy.prototype.layoutAxes = function (left, top, right, bottom, axes) {
|
|
46
|
+
// Set axisLength to default value which is seriesViewRect.height
|
|
47
|
+
axes.forEach(function (axis) {
|
|
48
|
+
axis.axisLength = undefined;
|
|
49
|
+
axis.offset = 0;
|
|
50
|
+
});
|
|
46
51
|
this.layoutAxesFromRightToLeft(left, top, right, bottom, axes);
|
|
47
52
|
};
|
|
48
53
|
return LeftAlignedOuterAxisLayoutStrategy;
|
|
@@ -8,6 +8,7 @@ import { ChartLayoutState } from "./ChartLayoutState";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class LeftAlignedOuterVerticallyStackedAxisLayoutStrategy extends BaseAxisLayoutStrategy {
|
|
10
10
|
readonly type = ELayoutStrategyType.LeftStacked;
|
|
11
|
+
readonly isStacked: boolean;
|
|
11
12
|
constructor();
|
|
12
13
|
measureAxes(sciChartSurface: SciChartSurface, chartLayoutState: ChartLayoutState, axes: AxisBase2D[]): void;
|
|
13
14
|
layoutAxes(left: number, top: number, right: number, bottom: number, axes: AxisBase2D[]): void;
|
|
@@ -28,6 +28,7 @@ var LeftAlignedOuterVerticallyStackedAxisLayoutStrategy = /** @class */ (functio
|
|
|
28
28
|
function LeftAlignedOuterVerticallyStackedAxisLayoutStrategy() {
|
|
29
29
|
var _this = _super.call(this) || this;
|
|
30
30
|
_this.type = LayoutStrategyType_1.ELayoutStrategyType.LeftStacked;
|
|
31
|
+
_this.isStacked = true;
|
|
31
32
|
_this.layoutAxisPartsStrategy = AxisLayoutHelpers_1.layoutAxisPartsLeftStrategy;
|
|
32
33
|
return _this;
|
|
33
34
|
}
|
|
@@ -53,7 +54,7 @@ var LeftAlignedOuterVerticallyStackedAxisLayoutStrategy = /** @class */ (functio
|
|
|
53
54
|
var totalAxisAreaHeight = bottom - top;
|
|
54
55
|
var firstAxis = axes[0];
|
|
55
56
|
var lastAxis = axes[axes.length - 1];
|
|
56
|
-
var axesWithDefinedLength = axes.filter(function (axis) { return axis.stackedAxisLength; });
|
|
57
|
+
var axesWithDefinedLength = axes.filter(function (axis) { return axis.stackedAxisLength !== undefined; });
|
|
57
58
|
var spaceWithoutBorders = axes.reduce(function (acc, axis) { return acc - axis.axisLayoutState.additionalBottomSize - axis.axisLayoutState.additionalTopSize; }, totalAxisAreaHeight +
|
|
58
59
|
(firstAxis === null || firstAxis === void 0 ? void 0 : firstAxis.axisLayoutState.additionalTopSize) +
|
|
59
60
|
(lastAxis === null || lastAxis === void 0 ? void 0 : lastAxis.axisLayoutState.additionalBottomSize));
|
|
@@ -71,14 +72,13 @@ var LeftAlignedOuterVerticallyStackedAxisLayoutStrategy = /** @class */ (functio
|
|
|
71
72
|
var _a = axis.axisLayoutState, axisSize = _a.axisSize, additionalRightSize = _a.additionalRightSize, additionalBottomSize = _a.additionalBottomSize, additionalTopSize = _a.additionalTopSize;
|
|
72
73
|
var rightOffset = right - additionalRightSize;
|
|
73
74
|
var leftOffset = rightOffset - axisSize;
|
|
74
|
-
var axisReservedHeight = axis.stackedAxisLength
|
|
75
|
+
var axisReservedHeight = axis.stackedAxisLength !== undefined
|
|
75
76
|
? _this.calculateTotalAxisHeight(axis, spaceWithoutBorders)
|
|
76
77
|
: defaultAxisReservedHeight;
|
|
77
78
|
var bottomOffset = topOffset + axisReservedHeight - additionalBottomSize;
|
|
78
79
|
topOffset += additionalTopSize;
|
|
79
80
|
axis.offset = topOffset - top;
|
|
80
81
|
axis.axisLength = bottomOffset - topOffset;
|
|
81
|
-
axis.isStackedAxis = true;
|
|
82
82
|
axis.isPrimaryAxis = true;
|
|
83
83
|
axis.viewRect = Rect_1.Rect.createWithCoords(leftOffset, topOffset, rightOffset, bottomOffset);
|
|
84
84
|
topOffset = bottomOffset + additionalBottomSize;
|
|
@@ -41,6 +41,11 @@ var RightAlignedInnerAxisLayoutStrategy = /** @class */ (function (_super) {
|
|
|
41
41
|
chartLayoutState.rightInnerAreaSize = Math.max(chartLayoutState.rightInnerAreaSize, requiredSize);
|
|
42
42
|
};
|
|
43
43
|
RightAlignedInnerAxisLayoutStrategy.prototype.layoutAxes = function (left, top, right, bottom, axes) {
|
|
44
|
+
// Set axisLength to default value which is seriesViewRect.height
|
|
45
|
+
axes.forEach(function (axis) {
|
|
46
|
+
axis.axisLength = undefined;
|
|
47
|
+
axis.offset = 0;
|
|
48
|
+
});
|
|
44
49
|
if (axes.length === 0) {
|
|
45
50
|
return;
|
|
46
51
|
}
|
|
@@ -43,6 +43,11 @@ var RightAlignedOuterAxisLayoutStrategy = /** @class */ (function (_super) {
|
|
|
43
43
|
chartLayoutState.rightOuterAreaSize = Math.max(chartLayoutState.rightOuterAreaSize, requiredSize);
|
|
44
44
|
};
|
|
45
45
|
RightAlignedOuterAxisLayoutStrategy.prototype.layoutAxes = function (left, top, right, bottom, axes) {
|
|
46
|
+
// Set axisLength to default value which is seriesViewRect.height
|
|
47
|
+
axes.forEach(function (axis) {
|
|
48
|
+
axis.axisLength = undefined;
|
|
49
|
+
axis.offset = 0;
|
|
50
|
+
});
|
|
46
51
|
this.layoutAxesFromLeftToRight(left, top, right, bottom, axes);
|
|
47
52
|
};
|
|
48
53
|
return RightAlignedOuterAxisLayoutStrategy;
|
|
@@ -8,6 +8,7 @@ import { ChartLayoutState } from "./ChartLayoutState";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class RightAlignedOuterVerticallyStackedAxisLayoutStrategy extends BaseAxisLayoutStrategy {
|
|
10
10
|
readonly type = ELayoutStrategyType.RightStacked;
|
|
11
|
+
readonly isStacked: boolean;
|
|
11
12
|
constructor();
|
|
12
13
|
measureAxes(sciChartSurface: SciChartSurface, chartLayoutState: ChartLayoutState, axes: AxisBase2D[]): void;
|
|
13
14
|
layoutAxes(left: number, top: number, right: number, bottom: number, axes: AxisBase2D[]): void;
|
|
@@ -28,6 +28,7 @@ var RightAlignedOuterVerticallyStackedAxisLayoutStrategy = /** @class */ (functi
|
|
|
28
28
|
function RightAlignedOuterVerticallyStackedAxisLayoutStrategy() {
|
|
29
29
|
var _this = _super.call(this) || this;
|
|
30
30
|
_this.type = LayoutStrategyType_1.ELayoutStrategyType.RightStacked;
|
|
31
|
+
_this.isStacked = true;
|
|
31
32
|
_this.layoutAxisPartsStrategy = AxisLayoutHelpers_1.layoutAxisPartsRightStrategy;
|
|
32
33
|
return _this;
|
|
33
34
|
}
|
|
@@ -77,7 +78,6 @@ var RightAlignedOuterVerticallyStackedAxisLayoutStrategy = /** @class */ (functi
|
|
|
77
78
|
topOffset += additionalTopSize;
|
|
78
79
|
axis.offset = topOffset - top;
|
|
79
80
|
axis.axisLength = bottomOffset - topOffset;
|
|
80
|
-
axis.isStackedAxis = true;
|
|
81
81
|
axis.isPrimaryAxis = true;
|
|
82
82
|
axis.viewRect = Rect_1.Rect.createWithCoords(leftOffset, topOffset, rightOffset, bottomOffset);
|
|
83
83
|
topOffset = bottomOffset + additionalBottomSize;
|
|
@@ -41,6 +41,11 @@ var TopAlignedInnerAxisLayoutStrategy = /** @class */ (function (_super) {
|
|
|
41
41
|
chartLayoutState.topInnerAreaSize = Math.max(chartLayoutState.topInnerAreaSize, requiredSize);
|
|
42
42
|
};
|
|
43
43
|
TopAlignedInnerAxisLayoutStrategy.prototype.layoutAxes = function (left, top, right, bottom, axes) {
|
|
44
|
+
// Set axisLength to default value which is seriesViewRect.width
|
|
45
|
+
axes.forEach(function (axis) {
|
|
46
|
+
axis.axisLength = undefined;
|
|
47
|
+
axis.offset = 0;
|
|
48
|
+
});
|
|
44
49
|
if (axes.length === 0) {
|
|
45
50
|
return;
|
|
46
51
|
}
|
|
@@ -43,6 +43,11 @@ var TopAlignedOuterAxisLayoutStrategy = /** @class */ (function (_super) {
|
|
|
43
43
|
chartLayoutState.topOuterAreaSize = Math.max(chartLayoutState.topOuterAreaSize, requiredSize);
|
|
44
44
|
};
|
|
45
45
|
TopAlignedOuterAxisLayoutStrategy.prototype.layoutAxes = function (left, top, right, bottom, axes) {
|
|
46
|
+
// Set axisLength to default value which is seriesViewRect.width
|
|
47
|
+
axes.forEach(function (axis) {
|
|
48
|
+
axis.axisLength = undefined;
|
|
49
|
+
axis.offset = 0;
|
|
50
|
+
});
|
|
46
51
|
this.layoutAxesFromBottomToTop(left, top, right, bottom, axes);
|
|
47
52
|
};
|
|
48
53
|
return TopAlignedOuterAxisLayoutStrategy;
|
|
@@ -8,6 +8,7 @@ import { ChartLayoutState } from "./ChartLayoutState";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class TopAlignedOuterHorizontallyStackedAxisLayoutStrategy extends BaseAxisLayoutStrategy {
|
|
10
10
|
readonly type = ELayoutStrategyType.TopStacked;
|
|
11
|
+
readonly isStacked: boolean;
|
|
11
12
|
constructor();
|
|
12
13
|
measureAxes(sciChartSurface: SciChartSurface, chartLayoutState: ChartLayoutState, axes: AxisBase2D[]): void;
|
|
13
14
|
layoutAxes(left: number, top: number, right: number, bottom: number, axes: AxisBase2D[]): void;
|
|
@@ -28,6 +28,7 @@ var TopAlignedOuterHorizontallyStackedAxisLayoutStrategy = /** @class */ (functi
|
|
|
28
28
|
function TopAlignedOuterHorizontallyStackedAxisLayoutStrategy() {
|
|
29
29
|
var _this = _super.call(this) || this;
|
|
30
30
|
_this.type = LayoutStrategyType_1.ELayoutStrategyType.TopStacked;
|
|
31
|
+
_this.isStacked = true;
|
|
31
32
|
_this.layoutAxisPartsStrategy = AxisLayoutHelpers_1.layoutAxisPartsTopStrategy;
|
|
32
33
|
return _this;
|
|
33
34
|
}
|
|
@@ -77,7 +78,6 @@ var TopAlignedOuterHorizontallyStackedAxisLayoutStrategy = /** @class */ (functi
|
|
|
77
78
|
leftOffset += additionalLeftSize;
|
|
78
79
|
axis.offset = leftOffset - left;
|
|
79
80
|
axis.axisLength = rightOffset - leftOffset;
|
|
80
|
-
axis.isStackedAxis = true;
|
|
81
81
|
axis.isPrimaryAxis = true;
|
|
82
82
|
axis.viewRect = Rect_1.Rect.createWithCoords(leftOffset, topOffset, rightOffset, bottomOffset);
|
|
83
83
|
leftOffset = rightOffset + additionalRightSize;
|
|
@@ -39,7 +39,7 @@ export interface IAnnotationBaseOptions {
|
|
|
39
39
|
*/
|
|
40
40
|
isHidden?: boolean;
|
|
41
41
|
/**
|
|
42
|
-
* @description set
|
|
42
|
+
* @description set annotation resize direction
|
|
43
43
|
*/
|
|
44
44
|
resizeDirections?: EXyDirection;
|
|
45
45
|
/**
|
|
@@ -187,7 +187,7 @@ export interface IAnnotationBaseOptions {
|
|
|
187
187
|
/** The thickness of the selection box line */
|
|
188
188
|
selectionBoxThickness?: number;
|
|
189
189
|
/** The dragPoints that should be enabled for this annotation */
|
|
190
|
-
dragPoints?: EDraggingGripPoint[];
|
|
190
|
+
dragPoints?: readonly EDraggingGripPoint[];
|
|
191
191
|
}
|
|
192
192
|
/**
|
|
193
193
|
* Defines the CoordinateMode for {@link AnnotationBase | Annotations} within SciChart's
|
|
@@ -256,7 +256,7 @@ export declare abstract class AnnotationBase implements IAnnotation, IAdornerPro
|
|
|
256
256
|
protected selectionBoxStrokeProperty: string;
|
|
257
257
|
protected selectionBoxDeltaProperty: number;
|
|
258
258
|
protected selectionBoxThicknessProperty: number;
|
|
259
|
-
protected dragPointsProperty: EDraggingGripPoint[];
|
|
259
|
+
protected dragPointsProperty: readonly EDraggingGripPoint[];
|
|
260
260
|
private opacityProperty;
|
|
261
261
|
private annotationLayerProperty;
|
|
262
262
|
private isEditableProperty;
|
|
@@ -371,9 +371,9 @@ export declare abstract class AnnotationBase implements IAnnotation, IAdornerPro
|
|
|
371
371
|
/** @inheritDoc */
|
|
372
372
|
onDetach(): void;
|
|
373
373
|
/** Get the dragging points that should be enabled for this annotation */
|
|
374
|
-
|
|
374
|
+
get dragPoints(): readonly EDraggingGripPoint[];
|
|
375
375
|
/** Set the dragging points that should be enabled for this annotation */
|
|
376
|
-
|
|
376
|
+
set dragPoints(dragPoints: readonly EDraggingGripPoint[]);
|
|
377
377
|
/** @inheritDoc */
|
|
378
378
|
abstract delete(): void;
|
|
379
379
|
/** Called internally. Send a click to the annotation if the point is in bounds, raising the clicked event and optionally selecting the annotation. */
|
|
@@ -426,7 +426,7 @@ export declare abstract class AnnotationBase implements IAnnotation, IAdornerPro
|
|
|
426
426
|
* Coordinates passed in are the top left and bottom right of the bounding box.
|
|
427
427
|
* To get the bounding coordinates in their original order call this.getAdornerAnnotationBorders(false, true);
|
|
428
428
|
*/
|
|
429
|
-
|
|
429
|
+
svgStringAdornerTemplate(x1: number, y1: number, x2: number, y2: number): string;
|
|
430
430
|
/**
|
|
431
431
|
* Updates adorner layer for the annotation
|
|
432
432
|
* @protected
|
|
@@ -515,15 +515,19 @@ var AnnotationBase = /** @class */ (function () {
|
|
|
515
515
|
this.selectedChanged.unsubscribeAll();
|
|
516
516
|
this.deleteAdorner();
|
|
517
517
|
};
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
518
|
+
Object.defineProperty(AnnotationBase.prototype, "dragPoints", {
|
|
519
|
+
/** Get the dragging points that should be enabled for this annotation */
|
|
520
|
+
get: function () {
|
|
521
|
+
return this.dragPointsProperty;
|
|
522
|
+
},
|
|
523
|
+
/** Set the dragging points that should be enabled for this annotation */
|
|
524
|
+
set: function (dragPoints) {
|
|
525
|
+
this.dragPointsProperty = dragPoints;
|
|
526
|
+
this.notifyPropertyChanged(constants_1.PROPERTY.DRAGPOINTS);
|
|
527
|
+
},
|
|
528
|
+
enumerable: false,
|
|
529
|
+
configurable: true
|
|
530
|
+
});
|
|
527
531
|
/** Called internally. Send a click to the annotation if the point is in bounds, raising the clicked event and optionally selecting the annotation. */
|
|
528
532
|
AnnotationBase.prototype.click = function (args, selectOnClick) {
|
|
529
533
|
var xyPoint = (0, translate_1.translateFromCanvasToSeriesViewRect)(args.mousePoint, this.parentSurface.seriesViewRect, true);
|
|
@@ -201,7 +201,7 @@ export declare class AxisMarkerAnnotation extends RenderContextAnnotationBase {
|
|
|
201
201
|
};
|
|
202
202
|
protected checkIsClickedOnAnnotationInternal(x: number, y: number): boolean;
|
|
203
203
|
protected updateAdornerInner(): void;
|
|
204
|
-
|
|
204
|
+
svgStringAdornerTemplate(x1: number, y1: number, x2: number, y2: number): string;
|
|
205
205
|
/**
|
|
206
206
|
* Calculates the adorner center relative to the canvas,
|
|
207
207
|
* The coordinates are not scaled
|
|
@@ -57,13 +57,6 @@ var AxisMarkerAnnotation = /** @class */ (function (_super) {
|
|
|
57
57
|
_this.fontStyleProperty = "Normal";
|
|
58
58
|
_this.colorProperty = "#FFFFFF";
|
|
59
59
|
_this.backgroundColorProperty = "#b36200";
|
|
60
|
-
_this.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
|
|
61
|
-
var colorLine = _this.selectionBoxStroke;
|
|
62
|
-
var _a = _this.calculateAdornerCenter(), x = _a.x, y = _a.y;
|
|
63
|
-
var width = x2 - x1;
|
|
64
|
-
var height = y2 - y1;
|
|
65
|
-
return "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"".concat(x1, "\" y=\"").concat(y1, "\" width=\"").concat(width, "\" height=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"").concat(_this.selectionBoxThickness, "px\" fill=\"none\" />\n ").concat(_this.getAnnotationGripSvg(x, y), "\n </svg>");
|
|
66
|
-
};
|
|
67
60
|
_this.fontSizeProperty = (_a = options === null || options === void 0 ? void 0 : options.fontSize) !== null && _a !== void 0 ? _a : _this.fontSizeProperty;
|
|
68
61
|
_this.fontFamilyProperty = (_b = options === null || options === void 0 ? void 0 : options.fontFamily) !== null && _b !== void 0 ? _b : _this.fontFamilyProperty;
|
|
69
62
|
_this.fontWeightProperty = (_c = options === null || options === void 0 ? void 0 : options.fontWeight) !== null && _c !== void 0 ? _c : _this.fontWeightProperty;
|
|
@@ -411,6 +404,13 @@ var AxisMarkerAnnotation = /** @class */ (function (_super) {
|
|
|
411
404
|
this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
|
|
412
405
|
}
|
|
413
406
|
};
|
|
407
|
+
AxisMarkerAnnotation.prototype.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
|
|
408
|
+
var colorLine = this.selectionBoxStroke;
|
|
409
|
+
var _a = this.calculateAdornerCenter(), x = _a.x, y = _a.y;
|
|
410
|
+
var width = x2 - x1;
|
|
411
|
+
var height = y2 - y1;
|
|
412
|
+
return "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"".concat(x1, "\" y=\"").concat(y1, "\" width=\"").concat(width, "\" height=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"").concat(this.selectionBoxThickness, "px\" fill=\"none\" />\n ").concat(this.getAnnotationGripSvg(x, y), "\n </svg>");
|
|
413
|
+
};
|
|
414
414
|
/**
|
|
415
415
|
* Calculates the adorner center relative to the canvas,
|
|
416
416
|
* The coordinates are not scaled
|
|
@@ -96,6 +96,6 @@ export declare class BoxAnnotation extends RenderContextAnnotationBase {
|
|
|
96
96
|
protected checkIsClickedOnAnnotationInternal(x: number, y: number): boolean;
|
|
97
97
|
protected notifyPropertyChanged(propertyName: string): void;
|
|
98
98
|
protected updateAdornerInner(): void;
|
|
99
|
-
|
|
99
|
+
svgStringAdornerTemplate(x1: number, y1: number, x2: number, y2: number): string;
|
|
100
100
|
private drawWithProvider;
|
|
101
101
|
}
|
|
@@ -56,27 +56,6 @@ var BoxAnnotation = /** @class */ (function (_super) {
|
|
|
56
56
|
/** @inheritDoc */
|
|
57
57
|
_this.type = IAnnotation_1.EAnnotationType.RenderContextBoxAnnotation;
|
|
58
58
|
_this.strokeThicknessProperty = 1;
|
|
59
|
-
_this.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
|
|
60
|
-
var colorLine = _this.selectionBoxStroke;
|
|
61
|
-
var width = x2 - x1;
|
|
62
|
-
var height = y2 - y1;
|
|
63
|
-
var svg = "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"".concat(x1, "\" y=\"").concat(y1, "\" width=\"").concat(width, "\" height=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"").concat(_this.selectionBoxThickness, "px\" fill=\"none\" />\n ");
|
|
64
|
-
var grips = _this.getAdornerAnnotationBorders(false, true);
|
|
65
|
-
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1)) {
|
|
66
|
-
svg += _this.getAnnotationGripSvg(grips.x1, grips.y1);
|
|
67
|
-
}
|
|
68
|
-
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y2)) {
|
|
69
|
-
svg += _this.getAnnotationGripSvg(grips.x2, grips.y2);
|
|
70
|
-
}
|
|
71
|
-
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y1)) {
|
|
72
|
-
svg += _this.getAnnotationGripSvg(grips.x2, grips.y1);
|
|
73
|
-
}
|
|
74
|
-
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y2)) {
|
|
75
|
-
svg += _this.getAnnotationGripSvg(grips.x1, grips.y2);
|
|
76
|
-
}
|
|
77
|
-
svg += "</svg>";
|
|
78
|
-
return svg;
|
|
79
|
-
};
|
|
80
59
|
_this.stroke = (_a = options === null || options === void 0 ? void 0 : options.stroke) !== null && _a !== void 0 ? _a : "#ffffff";
|
|
81
60
|
_this.strokeThickness = (_b = options === null || options === void 0 ? void 0 : options.strokeThickness) !== null && _b !== void 0 ? _b : 1;
|
|
82
61
|
_this.fill = (_c = options === null || options === void 0 ? void 0 : options.fill) !== null && _c !== void 0 ? _c : "#777777";
|
|
@@ -328,6 +307,27 @@ var BoxAnnotation = /** @class */ (function (_super) {
|
|
|
328
307
|
this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
|
|
329
308
|
}
|
|
330
309
|
};
|
|
310
|
+
BoxAnnotation.prototype.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
|
|
311
|
+
var colorLine = this.selectionBoxStroke;
|
|
312
|
+
var width = x2 - x1;
|
|
313
|
+
var height = y2 - y1;
|
|
314
|
+
var svg = "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"".concat(x1, "\" y=\"").concat(y1, "\" width=\"").concat(width, "\" height=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"").concat(this.selectionBoxThickness, "px\" fill=\"none\" />\n ");
|
|
315
|
+
var grips = this.getAdornerAnnotationBorders(false, true);
|
|
316
|
+
if (this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1)) {
|
|
317
|
+
svg += this.getAnnotationGripSvg(grips.x1, grips.y1);
|
|
318
|
+
}
|
|
319
|
+
if (this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y2)) {
|
|
320
|
+
svg += this.getAnnotationGripSvg(grips.x2, grips.y2);
|
|
321
|
+
}
|
|
322
|
+
if (this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y1)) {
|
|
323
|
+
svg += this.getAnnotationGripSvg(grips.x2, grips.y1);
|
|
324
|
+
}
|
|
325
|
+
if (this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y2)) {
|
|
326
|
+
svg += this.getAnnotationGripSvg(grips.x1, grips.y2);
|
|
327
|
+
}
|
|
328
|
+
svg += "</svg>";
|
|
329
|
+
return svg;
|
|
330
|
+
};
|
|
331
331
|
BoxAnnotation.prototype.drawWithProvider = function (renderContext, linesPen, fillBrush, xCalc, yCalc, rect, viewRect) {
|
|
332
332
|
var webAssemblyContext = this.parentSurface.webAssemblyContext2D;
|
|
333
333
|
var args = new webAssemblyContext.SCRTColumnDrawingParams();
|
|
@@ -188,5 +188,5 @@ export declare class LineAnnotation extends RenderContextAnnotationBase {
|
|
|
188
188
|
protected checkIsClickedOnAnnotationInternal(x: number, y: number): boolean;
|
|
189
189
|
protected notifyPropertyChanged(propertyName: string): void;
|
|
190
190
|
protected updateAdornerInner(): void;
|
|
191
|
-
|
|
191
|
+
svgStringAdornerTemplate(x1: number, y1: number, x2: number, y2: number): string;
|
|
192
192
|
}
|
|
@@ -73,10 +73,6 @@ var LineAnnotation = /** @class */ (function (_super) {
|
|
|
73
73
|
_this.axisLabelFillProperty = "#b36200";
|
|
74
74
|
_this.labelPlacementProperty = LabelPlacement_1.ELabelPlacement.Auto;
|
|
75
75
|
_this.labelValueProperty = "";
|
|
76
|
-
_this.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
|
|
77
|
-
var colorLine = _this.selectionBoxStroke;
|
|
78
|
-
return "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"".concat(x1, "\" y1=\"").concat(y1, "\" x2=\"").concat(x2, "\" y2=\"").concat(y2, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"6\" />\n ").concat(_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1) ? _this.getAnnotationGripSvg(x1, y1) : "", "\n ").concat(_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y2) ? _this.getAnnotationGripSvg(x2, y2) : "", "\n </svg>");
|
|
79
|
-
};
|
|
80
76
|
_this.stroke = (_a = options === null || options === void 0 ? void 0 : options.stroke) !== null && _a !== void 0 ? _a : _this.strokeProperty;
|
|
81
77
|
_this.strokeThickness = (_b = options === null || options === void 0 ? void 0 : options.strokeThickness) !== null && _b !== void 0 ? _b : _this.strokeThicknessProperty;
|
|
82
78
|
_this.strokeDashArray = (_c = options === null || options === void 0 ? void 0 : options.strokeDashArray) !== null && _c !== void 0 ? _c : _this.strokeDashArrayProperty;
|
|
@@ -453,6 +449,10 @@ var LineAnnotation = /** @class */ (function (_super) {
|
|
|
453
449
|
this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
|
|
454
450
|
}
|
|
455
451
|
};
|
|
452
|
+
LineAnnotation.prototype.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
|
|
453
|
+
var colorLine = this.selectionBoxStroke;
|
|
454
|
+
return "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"".concat(x1, "\" y1=\"").concat(y1, "\" x2=\"").concat(x2, "\" y2=\"").concat(y2, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"6\" />\n ").concat(this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1) ? this.getAnnotationGripSvg(x1, y1) : "", "\n ").concat(this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y2) ? this.getAnnotationGripSvg(x2, y2) : "", "\n </svg>");
|
|
455
|
+
};
|
|
456
456
|
return LineAnnotation;
|
|
457
457
|
}(RenderContextAnnotationBase_1.RenderContextAnnotationBase));
|
|
458
458
|
exports.LineAnnotation = LineAnnotation;
|
|
@@ -210,5 +210,5 @@ export declare class NativeTextAnnotation extends RenderContextAnnotationBase {
|
|
|
210
210
|
};
|
|
211
211
|
protected checkIsClickedOnAnnotationInternal(x: number, y: number): boolean;
|
|
212
212
|
protected updateAdornerInner(): void;
|
|
213
|
-
|
|
213
|
+
svgStringAdornerTemplate(x1: number, y1: number, x2: number, y2: number): string;
|
|
214
214
|
}
|
|
@@ -74,27 +74,6 @@ var NativeTextAnnotation = /** @class */ (function (_super) {
|
|
|
74
74
|
_this.multiLineAlignmentProperty = TextPosition_1.EMultiLineAlignment.Center;
|
|
75
75
|
_this.lineSpacingProperty = 3;
|
|
76
76
|
_this.scaleProperty = 1;
|
|
77
|
-
_this.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
|
|
78
|
-
var colorLine = _this.selectionBoxStroke;
|
|
79
|
-
var width = x2 - x1;
|
|
80
|
-
var height = y2 - y1;
|
|
81
|
-
var svg = "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"".concat(x1, "\" y=\"").concat(y1, "\" width=\"").concat(width, "\" height=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"").concat(_this.selectionBoxThickness, "px\" fill=\"none\" />\n ");
|
|
82
|
-
var grips = _this.getAdornerAnnotationBorders(false, true);
|
|
83
|
-
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1)) {
|
|
84
|
-
svg += _this.getAnnotationGripSvg(grips.x1, grips.y1);
|
|
85
|
-
}
|
|
86
|
-
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y2)) {
|
|
87
|
-
svg += _this.getAnnotationGripSvg(grips.x2, grips.y2);
|
|
88
|
-
}
|
|
89
|
-
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y1)) {
|
|
90
|
-
svg += _this.getAnnotationGripSvg(grips.x2, grips.y1);
|
|
91
|
-
}
|
|
92
|
-
if (_this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y2)) {
|
|
93
|
-
svg += _this.getAnnotationGripSvg(grips.x1, grips.y2);
|
|
94
|
-
}
|
|
95
|
-
svg += "</svg>";
|
|
96
|
-
return svg;
|
|
97
|
-
};
|
|
98
77
|
_this.textColorProperty = (_a = options === null || options === void 0 ? void 0 : options.textColor) !== null && _a !== void 0 ? _a : _this.textColorProperty;
|
|
99
78
|
_this.fontSizeProperty = (_b = options === null || options === void 0 ? void 0 : options.fontSize) !== null && _b !== void 0 ? _b : _this.fontSizeProperty;
|
|
100
79
|
_this.fontFamilyProperty = (_c = options === null || options === void 0 ? void 0 : options.fontFamily) !== null && _c !== void 0 ? _c : _this.fontFamilyProperty;
|
|
@@ -572,6 +551,27 @@ var NativeTextAnnotation = /** @class */ (function (_super) {
|
|
|
572
551
|
this.svgAdorner = annotationHelpers_1.annotationHelpers.createSvg(svgString, adornerSvgRoot);
|
|
573
552
|
}
|
|
574
553
|
};
|
|
554
|
+
NativeTextAnnotation.prototype.svgStringAdornerTemplate = function (x1, y1, x2, y2) {
|
|
555
|
+
var colorLine = this.selectionBoxStroke;
|
|
556
|
+
var width = x2 - x1;
|
|
557
|
+
var height = y2 - y1;
|
|
558
|
+
var svg = "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"".concat(x1, "\" y=\"").concat(y1, "\" width=\"").concat(width, "\" height=\"").concat(height, "\" stroke=\"").concat(colorLine, "\" stroke-width=\"").concat(this.selectionBoxThickness, "px\" fill=\"none\" />\n ");
|
|
559
|
+
var grips = this.getAdornerAnnotationBorders(false, true);
|
|
560
|
+
if (this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y1)) {
|
|
561
|
+
svg += this.getAnnotationGripSvg(grips.x1, grips.y1);
|
|
562
|
+
}
|
|
563
|
+
if (this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y2)) {
|
|
564
|
+
svg += this.getAnnotationGripSvg(grips.x2, grips.y2);
|
|
565
|
+
}
|
|
566
|
+
if (this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x2y1)) {
|
|
567
|
+
svg += this.getAnnotationGripSvg(grips.x2, grips.y1);
|
|
568
|
+
}
|
|
569
|
+
if (this.canDragPoint(AnnotationBase_1.EDraggingGripPoint.x1y2)) {
|
|
570
|
+
svg += this.getAnnotationGripSvg(grips.x1, grips.y2);
|
|
571
|
+
}
|
|
572
|
+
svg += "</svg>";
|
|
573
|
+
return svg;
|
|
574
|
+
};
|
|
575
575
|
return NativeTextAnnotation;
|
|
576
576
|
}(RenderContextAnnotationBase_1.RenderContextAnnotationBase));
|
|
577
577
|
exports.NativeTextAnnotation = NativeTextAnnotation;
|
|
@@ -116,5 +116,5 @@ export declare abstract class SvgAnnotationBase extends AnnotationBase {
|
|
|
116
116
|
* @protected
|
|
117
117
|
*/
|
|
118
118
|
protected calcAndSetAnnotationBorders(xCalc: CoordinateCalculatorBase, yCalc: CoordinateCalculatorBase): void;
|
|
119
|
-
|
|
119
|
+
svgStringAdornerTemplate(x1: number, y1: number, x2: number, y2: number): string;
|
|
120
120
|
}
|
|
@@ -244,10 +244,6 @@ export declare abstract class AxisBase2D extends AxisCore implements IThemeable
|
|
|
244
244
|
* This is only used to allow multiple primary axes, so that all stacked axes can draw gridlines
|
|
245
245
|
*/
|
|
246
246
|
get isStackedAxis(): boolean;
|
|
247
|
-
/** Internal Use. Gets or Sets if this axis is stacked
|
|
248
|
-
* This is only used to allow multiple primary axes, so that all stacked axes can draw gridlines
|
|
249
|
-
*/
|
|
250
|
-
set isStackedAxis(value: boolean);
|
|
251
247
|
/**
|
|
252
248
|
* Gets the background color of separate Axis
|
|
253
249
|
*/
|
|
@@ -348,7 +344,6 @@ export declare abstract class AxisBase2D extends AxisCore implements IThemeable
|
|
|
348
344
|
private visibleRangeSizeLimitProperty;
|
|
349
345
|
private zoomExtentsRangeProperty;
|
|
350
346
|
private isPrimaryAxisProperty;
|
|
351
|
-
private isStackedAxisProperty;
|
|
352
347
|
private stackedAxisLengthProperty;
|
|
353
348
|
private penCacheForMajorGridLines;
|
|
354
349
|
private penCacheForMinorGridLines;
|
|
@@ -119,7 +119,6 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
119
119
|
};
|
|
120
120
|
_this.isInnerAxisProperty = false;
|
|
121
121
|
_this.isPrimaryAxisProperty = false;
|
|
122
|
-
_this.isStackedAxisProperty = false;
|
|
123
122
|
_this.axisBorderProperty = {
|
|
124
123
|
borderBottom: 0,
|
|
125
124
|
borderLeft: 0,
|
|
@@ -342,14 +341,14 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
342
341
|
if (this.isPrimaryAxisProperty !== value) {
|
|
343
342
|
this.isPrimaryAxisProperty = value;
|
|
344
343
|
this.notifyPropertyChanged(constants_1.PROPERTY.IS_PRIMARY_AXIS);
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}
|
|
352
|
-
}
|
|
344
|
+
}
|
|
345
|
+
if (value && !this.isStackedAxis) {
|
|
346
|
+
var axes = this.isXAxis ? this.parentSurface.xAxes : this.parentSurface.yAxes;
|
|
347
|
+
axes.asArray().forEach(function (a) {
|
|
348
|
+
if (a !== _this && !a.isStackedAxis) {
|
|
349
|
+
a.isPrimaryAxis = false;
|
|
350
|
+
}
|
|
351
|
+
});
|
|
353
352
|
}
|
|
354
353
|
},
|
|
355
354
|
enumerable: false,
|
|
@@ -360,13 +359,8 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
360
359
|
* This is only used to allow multiple primary axes, so that all stacked axes can draw gridlines
|
|
361
360
|
*/
|
|
362
361
|
get: function () {
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
/** Internal Use. Gets or Sets if this axis is stacked
|
|
366
|
-
* This is only used to allow multiple primary axes, so that all stacked axes can draw gridlines
|
|
367
|
-
*/
|
|
368
|
-
set: function (value) {
|
|
369
|
-
this.isStackedAxisProperty = value;
|
|
362
|
+
var layoutStrategy = this.parentSurface.layoutManager.getAxisLayoutStrategy(this.axisAlignment, this.isInnerAxis);
|
|
363
|
+
return layoutStrategy.isStacked;
|
|
370
364
|
},
|
|
371
365
|
enumerable: false,
|
|
372
366
|
configurable: true
|
|
@@ -622,14 +616,14 @@ var AxisBase2D = /** @class */ (function (_super) {
|
|
|
622
616
|
*/
|
|
623
617
|
AxisBase2D.prototype.draw = function (renderContext) {
|
|
624
618
|
var _this = this;
|
|
619
|
+
if (!this.getIsValidForDrawing()) {
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
625
622
|
// Draw the Axis borders
|
|
626
623
|
var axisBordersLayer = (0, WebGlRenderContext2D_1.calculateAbsoluteRenderLayer)(this.parentSurface.layersOffset, this.parentSurface.stepBetweenLayers, DefaultRenderLayer_1.EDefaultRenderLayer.AxisBordersLayer);
|
|
627
624
|
renderContext.enqueueLayeredDraw(function () {
|
|
628
625
|
(0, drawBorder_1.drawBorder)(renderContext, _this.webAssemblyContext2D, _this.solidBrushCacheBorder, _this.viewRect, _this.axisBorder.borderLeft, _this.axisBorder.borderTop, _this.axisBorder.borderRight, _this.axisBorder.borderBottom, _this.axisBorder.color);
|
|
629
626
|
}, axisBordersLayer);
|
|
630
|
-
if (!this.getIsValidForDrawing()) {
|
|
631
|
-
return;
|
|
632
|
-
}
|
|
633
627
|
var tickObject = this.getTicksWithCoords();
|
|
634
628
|
var minorGridStyle = this.minorGridLineStyle;
|
|
635
629
|
var majorGridStyle = this.majorGridLineStyle;
|
|
@@ -966,7 +966,10 @@ var AxisCore = /** @class */ (function () {
|
|
|
966
966
|
* The coordinate-calculator allows you to transform between pixel and data coordinates (and vice versa)
|
|
967
967
|
*/
|
|
968
968
|
AxisCore.prototype.getCurrentCoordinateCalculator = function () {
|
|
969
|
-
if (
|
|
969
|
+
if (this.coordCalcCache && this.coordCalcCache.viewportDimension !== this.getAxisSize()) {
|
|
970
|
+
this.clearCoordCalcCache();
|
|
971
|
+
}
|
|
972
|
+
if (!this.coordCalcCache) {
|
|
970
973
|
this.coordCalcCache = this.getCurrentCoordinateCalculatorInternal();
|
|
971
974
|
}
|
|
972
975
|
return this.coordCalcCache;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { IDeletable } from "../../../Core/IDeletable";
|
|
2
2
|
import { SCRTColorVertex, SCRTFontKey, SCRTRectVertex, TSciChart, TSRTextBounds, TSRVector4, VectorColorVertex, VectorRectVertex } from "../../../types/TSciChart";
|
|
3
3
|
import { TTextStyle } from "../Axis/AxisCore";
|
|
4
|
+
export declare class FontKey implements IDeletable {
|
|
5
|
+
readonly firstLoadTime: number;
|
|
6
|
+
readonly nativeKey: SCRTFontKey;
|
|
7
|
+
constructor(nativeKey: SCRTFontKey);
|
|
8
|
+
delete(): void;
|
|
9
|
+
}
|
|
4
10
|
export declare const freeCache: (wasmContext: TSciChart) => IDeletable;
|
|
5
11
|
/**
|
|
6
12
|
* Returns an empty vector of Rectangles
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAllFontKeys = exports.getFontKey = exports.getVector4 = exports.getNativeRect = exports.getTextBounds = exports.getVertex = exports.getVectorColorVertex = exports.getVectorRectVertex = exports.freeCache = void 0;
|
|
3
|
+
exports.getAllFontKeys = exports.getFontKey = exports.getVector4 = exports.getNativeRect = exports.getTextBounds = exports.getVertex = exports.getVectorColorVertex = exports.getVectorRectVertex = exports.freeCache = exports.FontKey = void 0;
|
|
4
4
|
var Deleter_1 = require("../../../Core/Deleter");
|
|
5
5
|
var LabelCache_1 = require("../Axis/LabelProvider/LabelCache");
|
|
6
|
+
var SciChartDefaults_1 = require("../SciChartDefaults");
|
|
7
|
+
var FontKey = /** @class */ (function () {
|
|
8
|
+
function FontKey(nativeKey) {
|
|
9
|
+
this.firstLoadTime = Date.now();
|
|
10
|
+
this.nativeKey = nativeKey;
|
|
11
|
+
}
|
|
12
|
+
FontKey.prototype.delete = function () {
|
|
13
|
+
(0, Deleter_1.deleteSafe)(this.nativeKey);
|
|
14
|
+
};
|
|
15
|
+
return FontKey;
|
|
16
|
+
}());
|
|
17
|
+
exports.FontKey = FontKey;
|
|
6
18
|
var objectCache = new Map();
|
|
7
19
|
var getCache = function (wasmContext) {
|
|
8
20
|
var _a, _b;
|
|
@@ -154,14 +166,19 @@ var getFontKey = function (webAssemblyContext, labelStyle, advanced, transformed
|
|
|
154
166
|
};
|
|
155
167
|
var styleId = LabelCache_1.labelCache.getStyleId(newStyle);
|
|
156
168
|
if (!keyCache.has(styleId)) {
|
|
157
|
-
var fontKey = new webAssemblyContext.SCRTFontKey(labelStyle.fontFamily, labelStyle.fontSize, transformed, advanced);
|
|
169
|
+
var fontKey = new FontKey(new webAssemblyContext.SCRTFontKey(labelStyle.fontFamily, labelStyle.fontSize, transformed, advanced));
|
|
158
170
|
keyCache.set(styleId, fontKey);
|
|
159
171
|
}
|
|
160
|
-
|
|
172
|
+
var key = keyCache.get(styleId);
|
|
173
|
+
var timeSinceLoad = Date.now() - key.firstLoadTime;
|
|
174
|
+
if (timeSinceLoad > SciChartDefaults_1.SciChartDefaults.nativeFontTimeout) {
|
|
175
|
+
key.nativeKey.m_reload = false;
|
|
176
|
+
}
|
|
177
|
+
return key.nativeKey;
|
|
161
178
|
};
|
|
162
179
|
exports.getFontKey = getFontKey;
|
|
163
180
|
var getAllFontKeys = function (webAssemblyContext) {
|
|
164
181
|
var cache = getCache(webAssemblyContext);
|
|
165
|
-
return Array.from(cache.keyCache.values());
|
|
182
|
+
return Array.from(cache.keyCache.values()).map(function (k) { return k.nativeKey; });
|
|
166
183
|
};
|
|
167
184
|
exports.getAllFontKeys = getAllFontKeys;
|
|
@@ -42,7 +42,7 @@ export interface I2DSurfaceOptions extends ISurfaceOptionsBase {
|
|
|
42
42
|
canvasBorder?: TBorder;
|
|
43
43
|
drawSeriesBehindAxis?: boolean;
|
|
44
44
|
/**
|
|
45
|
-
* Optional -
|
|
45
|
+
* Optional - An {@link EAutoColorMode} which controls how often series colours set to AUTO_COLOR will be resolved. Default OnAddRemoveSeries
|
|
46
46
|
*/
|
|
47
47
|
autoColorMode?: EAutoColorMode;
|
|
48
48
|
}
|