@wcardinal/wcardinal-ui 0.430.0 → 0.432.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-base.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-chart-plot-area.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-chart-selection-container-impl.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-container.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-shape-base.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-chart-selection-shape.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-simple.d.ts +9 -0
- package/dist/types/wcardinal/ui/d-chart-selection-sub-impl.d.ts +6 -1
- package/dist/types/wcardinal/ui/d-chart-selection-sub.d.ts +18 -1
- package/dist/types/wcardinal/ui/d-chart-selection.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-diagram-canvas-editor-snap.d.ts +10 -1
- package/dist/types/wcardinal/ui/d-diagram-canvas-editor.d.ts +3 -1
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-editor.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-editor.d.ts +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js +3 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js +2 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js +2 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-shape-base.js +1 -1
- package/dist/wcardinal/ui/d-chart-selection-shape-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-shape.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-simple.js +17 -4
- package/dist/wcardinal/ui/d-chart-selection-simple.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-sub-impl.js +160 -61
- package/dist/wcardinal/ui/d-chart-selection-sub-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-sub.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-canvas-editor-snap.js +84 -22
- package/dist/wcardinal/ui/d-diagram-canvas-editor-snap.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-canvas-editor.js +22 -10
- package/dist/wcardinal/ui/d-diagram-canvas-editor.js.map +1 -1
- package/dist/wcardinal/ui/snapper/e-snapper-grid.js +1 -1
- package/dist/wcardinal/ui/snapper/e-snapper-grid.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-editor.js +3 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-editor.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-editor.js +3 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-editor.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +4 -1
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +4 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +4 -1
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +4 -1
- package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +4 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +4 -1
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +298 -101
- package/dist/wcardinal-ui.js +292 -101
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.432.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -47849,7 +47849,7 @@
|
|
|
47849
47849
|
this.size = serialized[2];
|
|
47850
47850
|
}
|
|
47851
47851
|
else {
|
|
47852
|
-
this.visible =
|
|
47852
|
+
this.visible = this._isVisibleDefault;
|
|
47853
47853
|
this.size = serialized[1];
|
|
47854
47854
|
}
|
|
47855
47855
|
};
|
|
@@ -62061,6 +62061,9 @@
|
|
|
62061
62061
|
DChartPlotAreaTwofoldSubBase.prototype.toBoundsDirty = function () {
|
|
62062
62062
|
this._isContainerBoundsDirty = true;
|
|
62063
62063
|
};
|
|
62064
|
+
DChartPlotAreaTwofoldSubBase.prototype.toLocal = function (position, from, result, skipUpdate) {
|
|
62065
|
+
return this._plotArea.toLocal(position, from, result, skipUpdate);
|
|
62066
|
+
};
|
|
62064
62067
|
DChartPlotAreaTwofoldSubBase.prototype.destroy = function () {
|
|
62065
62068
|
this._container.destroy();
|
|
62066
62069
|
this._series.destroy();
|
|
@@ -62603,7 +62606,7 @@
|
|
|
62603
62606
|
DChartSelectionShapeBase.prototype.set = function (container, position, mappedPosition, series) {
|
|
62604
62607
|
this.update(container, position, mappedPosition, series);
|
|
62605
62608
|
var shape = this._shape;
|
|
62606
|
-
if (shape) {
|
|
62609
|
+
if (shape != null) {
|
|
62607
62610
|
this._style(shape, series);
|
|
62608
62611
|
}
|
|
62609
62612
|
};
|
|
@@ -62650,7 +62653,8 @@
|
|
|
62650
62653
|
var bounds = container.plotArea.getSelectionBoundsX();
|
|
62651
62654
|
shape.transform.position.set(mappedX, bounds.y + bounds.height * 0.5);
|
|
62652
62655
|
shape.size.set(0, bounds.height);
|
|
62653
|
-
|
|
62656
|
+
var hw = shape.stroke.width * 0.5;
|
|
62657
|
+
shape.visible = bounds.x <= mappedX + hw && mappedX - hw <= bounds.x + bounds.width;
|
|
62654
62658
|
return true;
|
|
62655
62659
|
}
|
|
62656
62660
|
return false;
|
|
@@ -62677,7 +62681,8 @@
|
|
|
62677
62681
|
var bounds = container.plotArea.getSelectionBoundsY();
|
|
62678
62682
|
shape.transform.position.set(bounds.x + bounds.width * 0.5, mappedY);
|
|
62679
62683
|
shape.size.set(bounds.width, 0);
|
|
62680
|
-
|
|
62684
|
+
var hw = shape.stroke.width * 0.5;
|
|
62685
|
+
shape.visible = bounds.y <= mappedY + hw && mappedY - hw <= bounds.y + bounds.height;
|
|
62681
62686
|
return true;
|
|
62682
62687
|
}
|
|
62683
62688
|
return false;
|
|
@@ -62740,18 +62745,25 @@
|
|
|
62740
62745
|
var DChartSelectionSubImpl = /** @class */ (function (_super) {
|
|
62741
62746
|
__extends(DChartSelectionSubImpl, _super);
|
|
62742
62747
|
function DChartSelectionSubImpl(options) {
|
|
62743
|
-
var _a, _b, _c
|
|
62748
|
+
var _a, _b, _c;
|
|
62744
62749
|
var _this = _super.call(this) || this;
|
|
62745
62750
|
_this._container = null;
|
|
62746
62751
|
_this._series = null;
|
|
62747
62752
|
_this._isEnabled = (_a = options.enable) !== null && _a !== void 0 ? _a : true;
|
|
62748
|
-
_this.
|
|
62753
|
+
_this._isVisible = false;
|
|
62754
|
+
var gridline = options.gridline;
|
|
62755
|
+
if (gridline != null) {
|
|
62756
|
+
_this._gridline = new DChartSelectionContainerImpl(new DChartSelectionGridlineX(gridline.x), new DChartSelectionGridlineY(gridline.y));
|
|
62757
|
+
}
|
|
62758
|
+
else {
|
|
62759
|
+
_this._gridline = new DChartSelectionContainerImpl(new DChartSelectionGridlineX(), new DChartSelectionGridlineY());
|
|
62760
|
+
}
|
|
62749
62761
|
_this._marker = new DChartSelectionMarker(options.marker);
|
|
62750
|
-
_this._state = (
|
|
62762
|
+
_this._state = (_b = options.state) !== null && _b !== void 0 ? _b : DBaseState.HOVERED;
|
|
62751
62763
|
_this._coordinateX = null;
|
|
62752
62764
|
_this._coordinateY = null;
|
|
62753
62765
|
_this._position = new pixi_js.Point();
|
|
62754
|
-
_this._point = (
|
|
62766
|
+
_this._point = (_c = options.point) !== null && _c !== void 0 ? _c : DChartSelectionPoint.CLOSER;
|
|
62755
62767
|
_this._work = new pixi_js.Point();
|
|
62756
62768
|
// Events
|
|
62757
62769
|
var on = options.on;
|
|
@@ -62779,6 +62791,13 @@
|
|
|
62779
62791
|
this._coordinateX = null;
|
|
62780
62792
|
this._coordinateY = null;
|
|
62781
62793
|
};
|
|
62794
|
+
Object.defineProperty(DChartSelectionSubImpl.prototype, "visible", {
|
|
62795
|
+
get: function () {
|
|
62796
|
+
return this._isVisible;
|
|
62797
|
+
},
|
|
62798
|
+
enumerable: false,
|
|
62799
|
+
configurable: true
|
|
62800
|
+
});
|
|
62782
62801
|
Object.defineProperty(DChartSelectionSubImpl.prototype, "series", {
|
|
62783
62802
|
get: function () {
|
|
62784
62803
|
return this._series;
|
|
@@ -62808,49 +62827,116 @@
|
|
|
62808
62827
|
configurable: true
|
|
62809
62828
|
});
|
|
62810
62829
|
DChartSelectionSubImpl.prototype.set = function (series, result) {
|
|
62830
|
+
if (isNumber(series)) {
|
|
62831
|
+
this.set1(series, result);
|
|
62832
|
+
}
|
|
62833
|
+
else {
|
|
62834
|
+
this.set2(series, result);
|
|
62835
|
+
}
|
|
62836
|
+
};
|
|
62837
|
+
DChartSelectionSubImpl.prototype.set1 = function (x, y) {
|
|
62811
62838
|
var container = this._container;
|
|
62812
|
-
|
|
62813
|
-
|
|
62814
|
-
|
|
62815
|
-
|
|
62816
|
-
|
|
62817
|
-
|
|
62818
|
-
|
|
62819
|
-
|
|
62820
|
-
|
|
62821
|
-
|
|
62822
|
-
|
|
62823
|
-
|
|
62824
|
-
|
|
62825
|
-
|
|
62826
|
-
|
|
62827
|
-
|
|
62828
|
-
|
|
62829
|
-
|
|
62830
|
-
|
|
62831
|
-
|
|
62832
|
-
|
|
62833
|
-
|
|
62834
|
-
|
|
62835
|
-
|
|
62836
|
-
|
|
62837
|
-
|
|
62838
|
-
|
|
62839
|
-
|
|
62840
|
-
|
|
62841
|
-
|
|
62842
|
-
|
|
62843
|
-
|
|
62844
|
-
|
|
62845
|
-
|
|
62846
|
-
|
|
62847
|
-
|
|
62839
|
+
if (container == null) {
|
|
62840
|
+
return;
|
|
62841
|
+
}
|
|
62842
|
+
var work = this._work;
|
|
62843
|
+
work.set(x, y);
|
|
62844
|
+
var plotArea = container.plotArea;
|
|
62845
|
+
plotArea.container.toLocal(work, undefined, work, true);
|
|
62846
|
+
var coordinate = plotArea.coordinate;
|
|
62847
|
+
var coordinateX = coordinate.x.get(0);
|
|
62848
|
+
var coordinateY = coordinate.y.get(0);
|
|
62849
|
+
var newPositionX = work.x;
|
|
62850
|
+
var newPositionY = work.y;
|
|
62851
|
+
if (coordinateX && coordinateY) {
|
|
62852
|
+
newPositionX = coordinateX.unmap(coordinateX.transform.unmap(newPositionX));
|
|
62853
|
+
newPositionY = coordinateY.unmap(coordinateY.transform.unmap(newPositionY));
|
|
62854
|
+
}
|
|
62855
|
+
else {
|
|
62856
|
+
coordinateX = null;
|
|
62857
|
+
coordinateY = null;
|
|
62858
|
+
}
|
|
62859
|
+
var oldSeries = this._series;
|
|
62860
|
+
var position = this._position;
|
|
62861
|
+
if (this._isVisible &&
|
|
62862
|
+
oldSeries == null &&
|
|
62863
|
+
newPositionX === position.x &&
|
|
62864
|
+
newPositionY === position.y) {
|
|
62865
|
+
return;
|
|
62866
|
+
}
|
|
62867
|
+
this._isVisible = true;
|
|
62868
|
+
position.set(newPositionX, newPositionY);
|
|
62869
|
+
this._coordinateX = coordinateX;
|
|
62870
|
+
this._coordinateY = coordinateY;
|
|
62871
|
+
plotArea.container.localTransform.apply(work, work);
|
|
62872
|
+
this._gridline.set(container, position, work, null);
|
|
62873
|
+
this._marker.set(container, position, work, null);
|
|
62874
|
+
if (oldSeries != null) {
|
|
62875
|
+
var state = this._state;
|
|
62876
|
+
if (oldSeries) {
|
|
62877
|
+
oldSeries.state.remove(state);
|
|
62848
62878
|
}
|
|
62849
|
-
this.
|
|
62850
|
-
|
|
62851
|
-
|
|
62879
|
+
this._series = null;
|
|
62880
|
+
}
|
|
62881
|
+
this.emit("change", this);
|
|
62882
|
+
DApplications.update(plotArea);
|
|
62883
|
+
};
|
|
62884
|
+
DChartSelectionSubImpl.prototype.set2 = function (series, result) {
|
|
62885
|
+
var container = this._container;
|
|
62886
|
+
if (container == null) {
|
|
62887
|
+
return;
|
|
62888
|
+
}
|
|
62889
|
+
var work = this._work;
|
|
62890
|
+
var x = result.x;
|
|
62891
|
+
var y = result.y;
|
|
62892
|
+
switch (this._point) {
|
|
62893
|
+
case DChartSelectionPoint.PREVIOUS:
|
|
62894
|
+
x = result.p0x;
|
|
62895
|
+
y = result.p0y;
|
|
62896
|
+
break;
|
|
62897
|
+
case DChartSelectionPoint.NEXT:
|
|
62898
|
+
x = result.p1x;
|
|
62899
|
+
y = result.p1y;
|
|
62900
|
+
break;
|
|
62901
|
+
case DChartSelectionPoint.CLOSER:
|
|
62902
|
+
if (Math.abs(result.p0x - result.x) < Math.abs(result.p1x - result.x)) {
|
|
62903
|
+
x = result.p0x;
|
|
62904
|
+
y = result.p0y;
|
|
62905
|
+
}
|
|
62906
|
+
else {
|
|
62907
|
+
x = result.p1x;
|
|
62908
|
+
y = result.p1y;
|
|
62909
|
+
}
|
|
62910
|
+
}
|
|
62911
|
+
work.set(x, y);
|
|
62912
|
+
var plotArea = container.plotArea;
|
|
62913
|
+
plotArea.container.localTransform.apply(work, work);
|
|
62914
|
+
var coordinateX = series.coordinate.x;
|
|
62915
|
+
var coordinateY = series.coordinate.y;
|
|
62916
|
+
var newPositionX = x;
|
|
62917
|
+
var newPositionY = y;
|
|
62918
|
+
if (coordinateX && coordinateY) {
|
|
62919
|
+
newPositionX = coordinateX.unmap(coordinateX.transform.unmap(newPositionX));
|
|
62920
|
+
newPositionY = coordinateY.unmap(coordinateY.transform.unmap(newPositionY));
|
|
62921
|
+
}
|
|
62922
|
+
else {
|
|
62923
|
+
coordinateX = null;
|
|
62924
|
+
coordinateY = null;
|
|
62852
62925
|
}
|
|
62853
62926
|
var oldSeries = this._series;
|
|
62927
|
+
var position = this._position;
|
|
62928
|
+
if (this._isVisible &&
|
|
62929
|
+
oldSeries === series &&
|
|
62930
|
+
newPositionX === position.x &&
|
|
62931
|
+
newPositionY === position.y) {
|
|
62932
|
+
return;
|
|
62933
|
+
}
|
|
62934
|
+
this._isVisible = true;
|
|
62935
|
+
position.set(newPositionX, newPositionY);
|
|
62936
|
+
this._coordinateX = coordinateX;
|
|
62937
|
+
this._coordinateY = coordinateY;
|
|
62938
|
+
this._gridline.set(container, position, work, series);
|
|
62939
|
+
this._marker.set(container, position, work, series);
|
|
62854
62940
|
if (oldSeries !== series) {
|
|
62855
62941
|
var state = this._state;
|
|
62856
62942
|
if (oldSeries) {
|
|
@@ -62860,34 +62946,52 @@
|
|
|
62860
62946
|
series.state.add(state);
|
|
62861
62947
|
}
|
|
62862
62948
|
this.emit("change", this);
|
|
62949
|
+
DApplications.update(plotArea);
|
|
62863
62950
|
};
|
|
62864
62951
|
DChartSelectionSubImpl.prototype.unset = function () {
|
|
62865
|
-
var
|
|
62866
|
-
if (
|
|
62952
|
+
var container = this._container;
|
|
62953
|
+
if (container == null) {
|
|
62954
|
+
return;
|
|
62955
|
+
}
|
|
62956
|
+
var oldSeries = this._series;
|
|
62957
|
+
if (!this._isVisible && oldSeries == null) {
|
|
62958
|
+
return;
|
|
62959
|
+
}
|
|
62960
|
+
this._isVisible = false;
|
|
62961
|
+
this._coordinateX = null;
|
|
62962
|
+
this._coordinateY = null;
|
|
62963
|
+
this._gridline.unset();
|
|
62964
|
+
this._marker.unset();
|
|
62965
|
+
if (oldSeries != null) {
|
|
62867
62966
|
this._series = null;
|
|
62868
|
-
this.
|
|
62869
|
-
this._coordinateY = null;
|
|
62870
|
-
series.state.remove(this._state);
|
|
62871
|
-
this._gridline.unset();
|
|
62872
|
-
this._marker.unset();
|
|
62873
|
-
this.emit("change", this);
|
|
62967
|
+
oldSeries.state.remove(this._state);
|
|
62874
62968
|
}
|
|
62969
|
+
this.emit("change", this);
|
|
62970
|
+
DApplications.update(container.plotArea);
|
|
62875
62971
|
};
|
|
62876
62972
|
DChartSelectionSubImpl.prototype.update = function () {
|
|
62877
62973
|
var container = this._container;
|
|
62974
|
+
if (container == null) {
|
|
62975
|
+
return false;
|
|
62976
|
+
}
|
|
62977
|
+
if (!this._isVisible) {
|
|
62978
|
+
return false;
|
|
62979
|
+
}
|
|
62980
|
+
var position = this._position;
|
|
62981
|
+
var work = this._work;
|
|
62878
62982
|
var coordinateX = this._coordinateX;
|
|
62879
62983
|
var coordinateY = this._coordinateY;
|
|
62880
|
-
if (
|
|
62881
|
-
var position = this._position;
|
|
62882
|
-
var work = this._work;
|
|
62984
|
+
if (coordinateX && coordinateY) {
|
|
62883
62985
|
work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
|
|
62884
|
-
container.plotArea.container.localTransform.apply(work, work);
|
|
62885
|
-
var series = this._series;
|
|
62886
|
-
var isGridlineUpdated = this._gridline.update(container, position, work, series);
|
|
62887
|
-
var isMarkerUpdated = this._marker.update(container, position, work, series);
|
|
62888
|
-
return isGridlineUpdated || isMarkerUpdated;
|
|
62889
62986
|
}
|
|
62890
|
-
|
|
62987
|
+
else {
|
|
62988
|
+
work.copyFrom(position);
|
|
62989
|
+
}
|
|
62990
|
+
container.plotArea.container.localTransform.apply(work, work);
|
|
62991
|
+
var series = this._series;
|
|
62992
|
+
var isGridlineUpdated = this._gridline.update(container, position, work, series);
|
|
62993
|
+
var isMarkerUpdated = this._marker.update(container, position, work, series);
|
|
62994
|
+
return isGridlineUpdated || isMarkerUpdated;
|
|
62891
62995
|
};
|
|
62892
62996
|
return DChartSelectionSubImpl;
|
|
62893
62997
|
}(pixi_js.utils.EventEmitter));
|
|
@@ -62935,14 +63039,16 @@
|
|
|
62935
63039
|
return {
|
|
62936
63040
|
enable: (_a = dismiss.enable) !== null && _a !== void 0 ? _a : true,
|
|
62937
63041
|
tap: this.toDismissTap(dismiss.tap),
|
|
62938
|
-
longPress: this.toDismissLongPress(dismiss.longPress)
|
|
63042
|
+
longPress: this.toDismissLongPress(dismiss.longPress),
|
|
63043
|
+
noSeries: this.toDismissNoSeries(dismiss.noSeries)
|
|
62939
63044
|
};
|
|
62940
63045
|
}
|
|
62941
63046
|
}
|
|
62942
63047
|
return {
|
|
62943
63048
|
enable: true,
|
|
62944
63049
|
tap: this.toDismissTap(),
|
|
62945
|
-
longPress: this.toDismissLongPress()
|
|
63050
|
+
longPress: this.toDismissLongPress(),
|
|
63051
|
+
noSeries: this.toDismissNoSeries()
|
|
62946
63052
|
};
|
|
62947
63053
|
};
|
|
62948
63054
|
DChartSelectionSimple.prototype.toDismissTap = function (options) {
|
|
@@ -62958,6 +63064,12 @@
|
|
|
62958
63064
|
enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true
|
|
62959
63065
|
};
|
|
62960
63066
|
};
|
|
63067
|
+
DChartSelectionSimple.prototype.toDismissNoSeries = function (options) {
|
|
63068
|
+
var _a;
|
|
63069
|
+
return {
|
|
63070
|
+
enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true
|
|
63071
|
+
};
|
|
63072
|
+
};
|
|
62961
63073
|
DChartSelectionSimple.prototype.newSelected = function (point, options) {
|
|
62962
63074
|
return new DChartSelectionSubImpl(this.toSelectedOptions(point, options));
|
|
62963
63075
|
};
|
|
@@ -63023,7 +63135,12 @@
|
|
|
63023
63135
|
selected.set(series, result);
|
|
63024
63136
|
}
|
|
63025
63137
|
else {
|
|
63026
|
-
|
|
63138
|
+
if (dismiss.enable && dismiss.noSeries.enable) {
|
|
63139
|
+
selected.unset();
|
|
63140
|
+
}
|
|
63141
|
+
else {
|
|
63142
|
+
selected.set(global_1.x, global_1.y);
|
|
63143
|
+
}
|
|
63027
63144
|
}
|
|
63028
63145
|
}
|
|
63029
63146
|
};
|
|
@@ -63051,7 +63168,7 @@
|
|
|
63051
63168
|
var result = DChartSelectionSimple.WORK_SELECT;
|
|
63052
63169
|
var global_2 = e.data.global;
|
|
63053
63170
|
var series = container.calcHitPoint(global_2.x, global_2.y, result);
|
|
63054
|
-
if (series) {
|
|
63171
|
+
if (series != null) {
|
|
63055
63172
|
hovered.set(series, result);
|
|
63056
63173
|
}
|
|
63057
63174
|
else {
|
|
@@ -66024,6 +66141,7 @@
|
|
|
66024
66141
|
function DDiagramCanvasEditorSnap(parent, theme, options) {
|
|
66025
66142
|
var _this = this;
|
|
66026
66143
|
this._parent = parent;
|
|
66144
|
+
this._isDirty = true;
|
|
66027
66145
|
// Controller
|
|
66028
66146
|
var controller = options.controller;
|
|
66029
66147
|
this._controller = controller;
|
|
@@ -66039,49 +66157,83 @@
|
|
|
66039
66157
|
parent.addChildAt(container, parent.children.length - 1);
|
|
66040
66158
|
// Grid
|
|
66041
66159
|
this._grid = this.toGrid(theme, options.grid);
|
|
66160
|
+
this._gridScale = this.toGridScale(parent.scale.x);
|
|
66042
66161
|
// Target
|
|
66043
66162
|
this._target = this.toTarget(theme, options.target);
|
|
66044
66163
|
}
|
|
66045
66164
|
DDiagramCanvasEditorSnap.prototype.toGrid = function (theme, options) {
|
|
66046
|
-
var _a;
|
|
66165
|
+
var _a, _b;
|
|
66166
|
+
if (options != null) {
|
|
66167
|
+
return {
|
|
66168
|
+
major: this.toGridMajor(theme, options.major),
|
|
66169
|
+
minor: this.toGridMinor(theme, options.minor),
|
|
66170
|
+
size: (_a = options.size) !== null && _a !== void 0 ? _a : theme.getSnapGridSize(),
|
|
66171
|
+
adaptive: (_b = options.adaptive) !== null && _b !== void 0 ? _b : theme.isSnapGridAdaptive()
|
|
66172
|
+
};
|
|
66173
|
+
}
|
|
66047
66174
|
return {
|
|
66048
|
-
major: this.toGridMajor(theme
|
|
66049
|
-
minor: this.toGridMinor(theme
|
|
66050
|
-
size:
|
|
66175
|
+
major: this.toGridMajor(theme),
|
|
66176
|
+
minor: this.toGridMinor(theme),
|
|
66177
|
+
size: theme.getSnapGridSize(),
|
|
66178
|
+
adaptive: theme.isSnapGridAdaptive()
|
|
66051
66179
|
};
|
|
66052
66180
|
};
|
|
66053
66181
|
DDiagramCanvasEditorSnap.prototype.toGridMajor = function (theme, options) {
|
|
66054
66182
|
var _a, _b, _c, _d, _e;
|
|
66183
|
+
if (options != null) {
|
|
66184
|
+
return {
|
|
66185
|
+
interval: (_a = options.interval) !== null && _a !== void 0 ? _a : theme.getSnapGridMajorInterval(),
|
|
66186
|
+
color: (_b = options.color) !== null && _b !== void 0 ? _b : theme.getSnapGridMajorColor(),
|
|
66187
|
+
alpha: (_c = options.alpha) !== null && _c !== void 0 ? _c : theme.getSnapGridMajorAlpha(),
|
|
66188
|
+
width: (_d = options.width) !== null && _d !== void 0 ? _d : theme.getSnapGridMajorWidth(),
|
|
66189
|
+
style: (_e = options.style) !== null && _e !== void 0 ? _e : theme.getSnapGridMajorStyle()
|
|
66190
|
+
};
|
|
66191
|
+
}
|
|
66055
66192
|
return {
|
|
66056
|
-
interval:
|
|
66057
|
-
color:
|
|
66058
|
-
alpha:
|
|
66059
|
-
width:
|
|
66060
|
-
style:
|
|
66193
|
+
interval: theme.getSnapGridMajorInterval(),
|
|
66194
|
+
color: theme.getSnapGridMajorColor(),
|
|
66195
|
+
alpha: theme.getSnapGridMajorAlpha(),
|
|
66196
|
+
width: theme.getSnapGridMajorWidth(),
|
|
66197
|
+
style: theme.getSnapGridMajorStyle()
|
|
66061
66198
|
};
|
|
66062
66199
|
};
|
|
66063
66200
|
DDiagramCanvasEditorSnap.prototype.toGridMinor = function (theme, options) {
|
|
66064
66201
|
var _a, _b, _c, _d;
|
|
66202
|
+
if (options != null) {
|
|
66203
|
+
return {
|
|
66204
|
+
color: (_a = options.color) !== null && _a !== void 0 ? _a : theme.getSnapGridMinorColor(),
|
|
66205
|
+
alpha: (_b = options.alpha) !== null && _b !== void 0 ? _b : theme.getSnapGridMinorAlpha(),
|
|
66206
|
+
width: (_c = options.width) !== null && _c !== void 0 ? _c : theme.getSnapGridMinorWidth(),
|
|
66207
|
+
style: (_d = options.style) !== null && _d !== void 0 ? _d : theme.getSnapGridMinorStyle()
|
|
66208
|
+
};
|
|
66209
|
+
}
|
|
66065
66210
|
return {
|
|
66066
|
-
color:
|
|
66067
|
-
alpha:
|
|
66068
|
-
width:
|
|
66069
|
-
style:
|
|
66211
|
+
color: theme.getSnapGridMinorColor(),
|
|
66212
|
+
alpha: theme.getSnapGridMinorAlpha(),
|
|
66213
|
+
width: theme.getSnapGridMinorWidth(),
|
|
66214
|
+
style: theme.getSnapGridMinorStyle()
|
|
66070
66215
|
};
|
|
66071
66216
|
};
|
|
66072
66217
|
DDiagramCanvasEditorSnap.prototype.toTarget = function (theme, options) {
|
|
66073
66218
|
var _a, _b, _c, _d;
|
|
66219
|
+
if (options != null) {
|
|
66220
|
+
return {
|
|
66221
|
+
color: (_a = options.color) !== null && _a !== void 0 ? _a : theme.getSnapTargetColor(),
|
|
66222
|
+
alpha: (_b = options.alpha) !== null && _b !== void 0 ? _b : theme.getSnapTargetAlpha(),
|
|
66223
|
+
width: (_c = options.width) !== null && _c !== void 0 ? _c : theme.getSnapTargetWidth(),
|
|
66224
|
+
style: (_d = options.style) !== null && _d !== void 0 ? _d : theme.getSnapTargetStyle()
|
|
66225
|
+
};
|
|
66226
|
+
}
|
|
66074
66227
|
return {
|
|
66075
|
-
color:
|
|
66076
|
-
alpha:
|
|
66077
|
-
width:
|
|
66078
|
-
style:
|
|
66228
|
+
color: theme.getSnapTargetColor(),
|
|
66229
|
+
alpha: theme.getSnapTargetAlpha(),
|
|
66230
|
+
width: theme.getSnapTargetWidth(),
|
|
66231
|
+
style: theme.getSnapTargetStyle()
|
|
66079
66232
|
};
|
|
66080
66233
|
};
|
|
66081
66234
|
DDiagramCanvasEditorSnap.prototype.onChange = function () {
|
|
66082
|
-
|
|
66083
|
-
|
|
66084
|
-
DApplications.update(parent);
|
|
66235
|
+
this._isDirty = true;
|
|
66236
|
+
DApplications.update(this._parent);
|
|
66085
66237
|
};
|
|
66086
66238
|
Object.defineProperty(DDiagramCanvasEditorSnap.prototype, "container", {
|
|
66087
66239
|
get: function () {
|
|
@@ -66093,7 +66245,34 @@
|
|
|
66093
66245
|
DDiagramCanvasEditorSnap.prototype.serialize = function () {
|
|
66094
66246
|
return this._controller.serialize();
|
|
66095
66247
|
};
|
|
66096
|
-
DDiagramCanvasEditorSnap.prototype.
|
|
66248
|
+
DDiagramCanvasEditorSnap.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
|
|
66249
|
+
this._isDirty = true;
|
|
66250
|
+
};
|
|
66251
|
+
DDiagramCanvasEditorSnap.prototype.onScale = function (newX, newY, oldX, oldY) {
|
|
66252
|
+
var gridScale = this.toGridScale(newX);
|
|
66253
|
+
if (this._gridScale !== gridScale) {
|
|
66254
|
+
this._gridScale = gridScale;
|
|
66255
|
+
this._isDirty = true;
|
|
66256
|
+
}
|
|
66257
|
+
};
|
|
66258
|
+
DDiagramCanvasEditorSnap.prototype.toGridScale = function (sx) {
|
|
66259
|
+
if (!this._grid.adaptive || sx <= 0 || 1 <= sx) {
|
|
66260
|
+
return 1;
|
|
66261
|
+
}
|
|
66262
|
+
var target = 1 / sx;
|
|
66263
|
+
var result = 1;
|
|
66264
|
+
while (result < target && result < Number.MAX_SAFE_INTEGER) {
|
|
66265
|
+
result <<= 1;
|
|
66266
|
+
}
|
|
66267
|
+
return result;
|
|
66268
|
+
};
|
|
66269
|
+
DDiagramCanvasEditorSnap.prototype.onRender = function () {
|
|
66270
|
+
if (this._isDirty) {
|
|
66271
|
+
this._isDirty = false;
|
|
66272
|
+
this.updateAll();
|
|
66273
|
+
}
|
|
66274
|
+
};
|
|
66275
|
+
DDiagramCanvasEditorSnap.prototype.updateAll = function () {
|
|
66097
66276
|
var parent = this._parent;
|
|
66098
66277
|
var container = this._container;
|
|
66099
66278
|
var controller = this._controller;
|
|
@@ -66114,7 +66293,7 @@
|
|
|
66114
66293
|
var major = grid.major;
|
|
66115
66294
|
var minor = grid.minor;
|
|
66116
66295
|
var interval = major.interval;
|
|
66117
|
-
var size = grid.size(controller.grid.size, w, h);
|
|
66296
|
+
var size = grid.size(controller.grid.size * this._gridScale, w, h);
|
|
66118
66297
|
for (var x = size, ix = 1; x < w; x += size, ix += 1, index += 1) {
|
|
66119
66298
|
var style = ix % interval === 0 ? major : minor;
|
|
66120
66299
|
this.update(container, shapes, index, x, hh, TOP, w, h, style);
|
|
@@ -66207,12 +66386,8 @@
|
|
|
66207
66386
|
});
|
|
66208
66387
|
Object.defineProperty(DDiagramCanvasEditor.prototype, "shape", {
|
|
66209
66388
|
get: function () {
|
|
66210
|
-
var
|
|
66211
|
-
|
|
66212
|
-
result = this.newShape();
|
|
66213
|
-
this._shape = result;
|
|
66214
|
-
}
|
|
66215
|
-
return result;
|
|
66389
|
+
var _a;
|
|
66390
|
+
return ((_a = this._shape) !== null && _a !== void 0 ? _a : (this._shape = this.newShape()));
|
|
66216
66391
|
},
|
|
66217
66392
|
enumerable: false,
|
|
66218
66393
|
configurable: true
|
|
@@ -66251,10 +66426,26 @@
|
|
|
66251
66426
|
thumbnail: thumbnail === null || thumbnail === void 0 ? void 0 : thumbnail.serialize()
|
|
66252
66427
|
};
|
|
66253
66428
|
};
|
|
66254
|
-
DDiagramCanvasEditor.prototype.
|
|
66255
|
-
var
|
|
66256
|
-
|
|
66257
|
-
|
|
66429
|
+
DDiagramCanvasEditor.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
|
|
66430
|
+
var snap = this._snap;
|
|
66431
|
+
if (snap != null) {
|
|
66432
|
+
snap.onResize(newWidth, newHeight, oldWidth, oldHeight);
|
|
66433
|
+
}
|
|
66434
|
+
_super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
|
|
66435
|
+
};
|
|
66436
|
+
DDiagramCanvasEditor.prototype.onScale = function (newX, newY, oldX, oldY) {
|
|
66437
|
+
var snap = this._snap;
|
|
66438
|
+
if (snap != null) {
|
|
66439
|
+
snap.onScale(newX, newY, oldX, oldY);
|
|
66440
|
+
}
|
|
66441
|
+
_super.prototype.onScale.call(this, newX, newY, oldX, oldY);
|
|
66442
|
+
};
|
|
66443
|
+
DDiagramCanvasEditor.prototype.render = function (renderer) {
|
|
66444
|
+
var snap = this._snap;
|
|
66445
|
+
if (snap != null) {
|
|
66446
|
+
snap.onRender();
|
|
66447
|
+
}
|
|
66448
|
+
_super.prototype.render.call(this, renderer);
|
|
66258
66449
|
};
|
|
66259
66450
|
DDiagramCanvasEditor.prototype.getType = function () {
|
|
66260
66451
|
return "DDiagramCanvasEditor";
|