@wcardinal/wcardinal-ui 0.418.0 → 0.419.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-axis-base-tick-container.d.ts +7 -7
- package/dist/types/wcardinal/ui/d-chart-axis-container-impl.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-chart-axis-container.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-chart-coordinate-base.d.ts +3 -5
- package/dist/types/wcardinal/ui/d-chart-coordinate-container-impl.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-chart-coordinate-container.d.ts +2 -2
- package/dist/types/wcardinal/ui/{d-chart-plot-area-impl.d.ts → d-chart-plot-area-base.d.ts} +23 -20
- package/dist/types/wcardinal/ui/d-chart-plot-area-onefold.d.ts +41 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-axis-container.d.ts +24 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.d.ts +22 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.d.ts +18 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-series-container.d.ts +43 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-base.d.ts +46 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.d.ts +11 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.d.ts +11 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub.d.ts +22 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-view-target.d.ts +30 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold.d.ts +46 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area.d.ts +31 -7
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-x.d.ts +0 -1
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-y.d.ts +0 -1
- package/dist/types/wcardinal/ui/d-chart-series-container-impl.d.ts +5 -4
- package/dist/types/wcardinal/ui/d-chart-series-container.d.ts +2 -3
- package/dist/types/wcardinal/ui/d-chart.d.ts +5 -3
- package/dist/types/wcardinal/ui/index.d.ts +14 -1
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.d.ts +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-bar.js +13 -8
- package/dist/wcardinal/ui/d-chart-axis-base-bar.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-guide-container.js +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-guide-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +15 -14
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js +4 -6
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js +4 -6
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js +4 -6
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-container-impl.js +2 -3
- package/dist/wcardinal/ui/d-chart-axis-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-guide-simple.js +9 -6
- package/dist/wcardinal/ui/d-chart-axis-guide-simple.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-base.js +2 -10
- package/dist/wcardinal/ui/d-chart-coordinate-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area-base.js +117 -0
- package/dist/wcardinal/ui/d-chart-plot-area-base.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-onefold.js +166 -0
- package/dist/wcardinal/ui/d-chart-plot-area-onefold.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-axis-container.js +128 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-axis-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.js +118 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.js +53 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.js +28 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.js +28 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-series-container.js +186 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-series-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js +109 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.js +49 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.js +50 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub.js +6 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-view-target.js +81 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-view-target.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold.js +204 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js +4 -8
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js +4 -8
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-marker.js +5 -2
- package/dist/wcardinal/ui/d-chart-selection-marker.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-container-impl.js +4 -2
- package/dist/wcardinal/ui/d-chart-series-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-linear.js +1 -1
- package/dist/wcardinal/ui/d-chart-series-linear.js.map +1 -1
- package/dist/wcardinal/ui/d-chart.js +19 -14
- package/dist/wcardinal/ui/d-chart.js.map +1 -1
- package/dist/wcardinal/ui/index.js +14 -1
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.js +3 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.js +3 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.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 +1275 -228
- package/dist/wcardinal-ui.js +1269 -228
- 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/d-chart-plot-area-impl.js +0 -237
- package/dist/wcardinal/ui/d-chart-plot-area-impl.js.map +0 -1
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { __extends } from "tslib";
|
|
6
|
+
import { DApplications } from "./d-applications";
|
|
7
|
+
import { DChartPlotAreaContainer } from "./d-chart-plot-area-container";
|
|
8
|
+
import { DChartPlotAreaBase } from "./d-chart-plot-area-base";
|
|
9
|
+
import { DBaseOverflowMask } from "./d-base-overflow-mask";
|
|
10
|
+
import { DChartSeriesContainerImpl } from "./d-chart-series-container-impl";
|
|
11
|
+
import { DChartCoordinateContainerImpl } from "./d-chart-coordinate-container-impl";
|
|
12
|
+
import { DChartAxisContainerImpl } from "./d-chart-axis-container-impl";
|
|
13
|
+
import { DAnimationTimings } from "./d-animation-timings";
|
|
14
|
+
import { DViewImpl } from "./d-view-impl";
|
|
15
|
+
import { EShapeContainer } from "./shape/e-shape-container";
|
|
16
|
+
var DChartPlotAreaOnefold = /** @class */ (function (_super) {
|
|
17
|
+
__extends(DChartPlotAreaOnefold, _super);
|
|
18
|
+
function DChartPlotAreaOnefold(chart, options) {
|
|
19
|
+
var _a;
|
|
20
|
+
var _this = _super.call(this, chart, options) || this;
|
|
21
|
+
// Container
|
|
22
|
+
var container = new DChartPlotAreaContainer(function () {
|
|
23
|
+
_this._isViewDirty = true;
|
|
24
|
+
_this._isContainerBoundsDirty = true;
|
|
25
|
+
DApplications.update(_this);
|
|
26
|
+
});
|
|
27
|
+
_this._container = container;
|
|
28
|
+
_this.addChild(container);
|
|
29
|
+
// Overflow mask
|
|
30
|
+
var mask = (_a = options === null || options === void 0 ? void 0 : options.mask) !== null && _a !== void 0 ? _a : _this.theme.isOverflowMaskEnabled();
|
|
31
|
+
if (mask) {
|
|
32
|
+
container.mask = _this.getOverflowMask();
|
|
33
|
+
}
|
|
34
|
+
// View
|
|
35
|
+
_this._isViewDirty = true;
|
|
36
|
+
_this._view = new DViewImpl(_this, function () { return container; }, options === null || options === void 0 ? void 0 : options.view);
|
|
37
|
+
// Coordinate
|
|
38
|
+
_this._coordinate = new DChartCoordinateContainerImpl(_this, options === null || options === void 0 ? void 0 : options.coordinate);
|
|
39
|
+
// Series
|
|
40
|
+
var seriesOptions = options === null || options === void 0 ? void 0 : options.series;
|
|
41
|
+
var series = new DChartSeriesContainerImpl(_this, seriesOptions);
|
|
42
|
+
_this._series = series;
|
|
43
|
+
// Axis
|
|
44
|
+
var axisOptions = options === null || options === void 0 ? void 0 : options.axis;
|
|
45
|
+
var axis = new DChartAxisContainerImpl(_this, new EShapeContainer(), axisOptions);
|
|
46
|
+
_this._axis = axis;
|
|
47
|
+
_this.addChild(axis.container);
|
|
48
|
+
// Add series
|
|
49
|
+
_this.addSeries(series, seriesOptions === null || seriesOptions === void 0 ? void 0 : seriesOptions.list);
|
|
50
|
+
// Add axes
|
|
51
|
+
_this.addAxes(axis, axisOptions === null || axisOptions === void 0 ? void 0 : axisOptions.list);
|
|
52
|
+
// Selection
|
|
53
|
+
var selection = seriesOptions === null || seriesOptions === void 0 ? void 0 : seriesOptions.selection;
|
|
54
|
+
if (selection != null) {
|
|
55
|
+
series.selection = selection;
|
|
56
|
+
selection.bind(series);
|
|
57
|
+
}
|
|
58
|
+
return _this;
|
|
59
|
+
}
|
|
60
|
+
DChartPlotAreaOnefold.prototype.getOverflowMask = function () {
|
|
61
|
+
if (this._overflowMask == null) {
|
|
62
|
+
this._overflowMask = new DBaseOverflowMask(this);
|
|
63
|
+
this.reflowable.add(this._overflowMask);
|
|
64
|
+
this.toDirty();
|
|
65
|
+
}
|
|
66
|
+
return this._overflowMask;
|
|
67
|
+
};
|
|
68
|
+
DChartPlotAreaOnefold.prototype.addSeries = function (series, list) {
|
|
69
|
+
if (list != null) {
|
|
70
|
+
var listLength = list.length;
|
|
71
|
+
if (0 < listLength) {
|
|
72
|
+
for (var i = 0; i < listLength; ++i) {
|
|
73
|
+
series.add(list[i]);
|
|
74
|
+
}
|
|
75
|
+
series.update();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
DChartPlotAreaOnefold.prototype.addAxes = function (axis, list) {
|
|
80
|
+
if (list != null) {
|
|
81
|
+
for (var i = 0, imax = list.length; i < imax; ++i) {
|
|
82
|
+
axis.add(list[i]);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
Object.defineProperty(DChartPlotAreaOnefold.prototype, "coordinate", {
|
|
87
|
+
get: function () {
|
|
88
|
+
return this._coordinate;
|
|
89
|
+
},
|
|
90
|
+
enumerable: false,
|
|
91
|
+
configurable: true
|
|
92
|
+
});
|
|
93
|
+
Object.defineProperty(DChartPlotAreaOnefold.prototype, "series", {
|
|
94
|
+
get: function () {
|
|
95
|
+
return this._series;
|
|
96
|
+
},
|
|
97
|
+
enumerable: false,
|
|
98
|
+
configurable: true
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(DChartPlotAreaOnefold.prototype, "container", {
|
|
101
|
+
get: function () {
|
|
102
|
+
return this._container;
|
|
103
|
+
},
|
|
104
|
+
enumerable: false,
|
|
105
|
+
configurable: true
|
|
106
|
+
});
|
|
107
|
+
Object.defineProperty(DChartPlotAreaOnefold.prototype, "axis", {
|
|
108
|
+
get: function () {
|
|
109
|
+
return this._axis;
|
|
110
|
+
},
|
|
111
|
+
enumerable: false,
|
|
112
|
+
configurable: true
|
|
113
|
+
});
|
|
114
|
+
DChartPlotAreaOnefold.prototype.newView = function (options) {
|
|
115
|
+
var _this = this;
|
|
116
|
+
return new DViewImpl(this, function () { return _this._container; }, options === null || options === void 0 ? void 0 : options.view);
|
|
117
|
+
};
|
|
118
|
+
DChartPlotAreaOnefold.prototype.onViewDirty = function () {
|
|
119
|
+
this._coordinate.fit();
|
|
120
|
+
this._axis.onRender();
|
|
121
|
+
this._series.onRender();
|
|
122
|
+
};
|
|
123
|
+
DChartPlotAreaOnefold.prototype.fit = function (duration, domainFrom, domainTo, rangeFrom, rangeTo) {
|
|
124
|
+
var coordinate = this._coordinate;
|
|
125
|
+
var axis = this._axis;
|
|
126
|
+
var series = this._series;
|
|
127
|
+
if (duration != null && duration <= 0) {
|
|
128
|
+
coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);
|
|
129
|
+
axis.update();
|
|
130
|
+
series.update();
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
this._blendDuration = duration != null ? duration : 200;
|
|
134
|
+
this._blendStartTime = Date.now();
|
|
135
|
+
coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);
|
|
136
|
+
var blendTimeout = this._blendTimeout;
|
|
137
|
+
if (blendTimeout != null) {
|
|
138
|
+
window.clearTimeout(blendTimeout);
|
|
139
|
+
}
|
|
140
|
+
this._blendTimeout = window.setTimeout(this._onBlendBound, 0);
|
|
141
|
+
}
|
|
142
|
+
return this;
|
|
143
|
+
};
|
|
144
|
+
DChartPlotAreaOnefold.prototype.onBlend = function () {
|
|
145
|
+
var now = Date.now();
|
|
146
|
+
var ratio = (now - this._blendStartTime) / this._blendDuration;
|
|
147
|
+
if (ratio < 1) {
|
|
148
|
+
this._blendTimeout = window.setTimeout(this._onBlendBound, 0);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
this._blendTimeout = null;
|
|
152
|
+
ratio = 1;
|
|
153
|
+
}
|
|
154
|
+
this._coordinate.blend(DAnimationTimings.ELASTIC(ratio));
|
|
155
|
+
this._axis.update();
|
|
156
|
+
this._series.update();
|
|
157
|
+
};
|
|
158
|
+
DChartPlotAreaOnefold.prototype.destroy = function () {
|
|
159
|
+
this._container.destroy();
|
|
160
|
+
this._series.destroy();
|
|
161
|
+
this._axis.destroy();
|
|
162
|
+
};
|
|
163
|
+
return DChartPlotAreaOnefold;
|
|
164
|
+
}(DChartPlotAreaBase));
|
|
165
|
+
export { DChartPlotAreaOnefold };
|
|
166
|
+
//# sourceMappingURL=d-chart-plot-area-onefold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-onefold.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-onefold.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAM5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAA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AC,eAAe,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC;QAC/D,IAAI,KAAK,GAAG,CAAC,EAAE;YACd,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;SAC9D;aAAM;YACN,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;YAC1B,KAAK,GAAG,CAAC,CAAC;SACV;QACD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QACpB,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;IAEQ,uCAAO,GAAhB;QACC,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;QAC1B,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACvB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IACF,4BAAC;AAAD,CAAC,AApKD,CAOU,kBAAkB,GA6J3B","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DApplications } from \"./d-applications\";\nimport { DBase } from \"./d-base\";\nimport { DThemeChartPlotArea, DChartPlotAreaOptions } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { DChartPlotAreaBase } from \"./d-chart-plot-area-base\";\nimport { DBaseOverflowMask } from \"./d-base-overflow-mask\";\nimport { DChartSeriesContainer, DChartSeriesContainerOptions } from \"./d-chart-series-container\";\nimport { DChartSeriesContainerImpl } from \"./d-chart-series-container-impl\";\nimport {\n\tDChartCoordinateContainer,\n\tDChartCoordinateContainerOptions\n} from \"./d-chart-coordinate-container\";\nimport { DChartAxisContainer, DChartAxisContainerOptions } from \"./d-chart-axis-container\";\nimport { DChartCoordinateContainerImpl } from \"./d-chart-coordinate-container-impl\";\nimport { DChartAxisContainerImpl } from \"./d-chart-axis-container-impl\";\nimport { DAnimationTimings } from \"./d-animation-timings\";\nimport { DChartSelection } from \"./d-chart-selection\";\nimport { DChartSeries } from \"./d-chart-series\";\nimport { DChartAxis } from \"./d-chart-axis\";\nimport { DViewImpl } from \"./d-view-impl\";\nimport { EShapeContainer } from \"./shape/e-shape-container\";\n\nexport interface DChartPlotAreaSingleSeriesContainerOptions<CHART extends DBase = DBase>\n\textends DChartSeriesContainerOptions<CHART> {\n\tselection?: DChartSelection<CHART>;\n}\n\nexport interface DChartPlotAreaSingleOptions<\n\tCHART extends DBase = DBase,\n\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea\n> extends DChartPlotAreaOptions<CHART, THEME> {\n\tseries?: DChartPlotAreaSingleSeriesContainerOptions<CHART>;\n\tcoordinate?: DChartCoordinateContainerOptions<CHART>;\n\taxis?: DChartAxisContainerOptions<CHART>;\n}\n\nexport class DChartPlotAreaOnefold<\n\tCHART extends DBase = DBase,\n\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea,\n\tOPTIONS extends DChartPlotAreaSingleOptions<CHART, THEME> = DChartPlotAreaSingleOptions<\n\t\tCHART,\n\t\tTHEME\n\t>\n> extends DChartPlotAreaBase<CHART, THEME, OPTIONS> {\n\tprotected _container: DChartPlotAreaContainer;\n\tprotected _series: DChartSeriesContainerImpl<CHART>;\n\tprotected _coordinate: DChartCoordinateContainer<CHART>;\n\tprotected _axis: DChartAxisContainerImpl<CHART>;\n\n\tconstructor(chart: CHART, options?: OPTIONS) {\n\t\tsuper(chart, options);\n\n\t\t// Container\n\t\tconst container = new DChartPlotAreaContainer((): void => {\n\t\t\tthis._isViewDirty = true;\n\t\t\tthis._isContainerBoundsDirty = true;\n\t\t\tDApplications.update(this);\n\t\t});\n\t\tthis._container = container;\n\t\tthis.addChild(container);\n\n\t\t// Overflow mask\n\t\tconst mask = options?.mask ?? this.theme.isOverflowMaskEnabled();\n\t\tif (mask) {\n\t\t\tcontainer.mask = this.getOverflowMask();\n\t\t}\n\n\t\t// View\n\t\tthis._isViewDirty = true;\n\t\tthis._view = new DViewImpl(this, () => container, options?.view);\n\n\t\t// Coordinate\n\t\tthis._coordinate = new DChartCoordinateContainerImpl(this, options?.coordinate);\n\n\t\t// Series\n\t\tconst seriesOptions = options?.series;\n\t\tconst series = new DChartSeriesContainerImpl(this, seriesOptions);\n\t\tthis._series = series;\n\n\t\t// Axis\n\t\tconst axisOptions = options?.axis;\n\t\tconst axis = new DChartAxisContainerImpl(this, new EShapeContainer(), axisOptions);\n\t\tthis._axis = axis;\n\t\tthis.addChild(axis.container);\n\n\t\t// Add series\n\t\tthis.addSeries(series, seriesOptions?.list);\n\n\t\t// Add axes\n\t\tthis.addAxes(axis, axisOptions?.list);\n\n\t\t// Selection\n\t\tconst selection = seriesOptions?.selection;\n\t\tif (selection != null) {\n\t\t\tseries.selection = selection;\n\t\t\tselection.bind(series);\n\t\t}\n\t}\n\n\tprotected getOverflowMask(): DBaseOverflowMask {\n\t\tif (this._overflowMask == null) {\n\t\t\tthis._overflowMask = new DBaseOverflowMask(this);\n\t\t\tthis.reflowable.add(this._overflowMask);\n\t\t\tthis.toDirty();\n\t\t}\n\t\treturn this._overflowMask;\n\t}\n\n\tprotected addSeries(series: DChartSeriesContainer<CHART>, list?: DChartSeries<CHART>[]): void {\n\t\tif (list != null) {\n\t\t\tconst listLength = list.length;\n\t\t\tif (0 < listLength) {\n\t\t\t\tfor (let i = 0; i < listLength; ++i) {\n\t\t\t\t\tseries.add(list[i]);\n\t\t\t\t}\n\t\t\t\tseries.update();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected addAxes(axis: DChartAxisContainer<CHART>, list?: DChartAxis<CHART>[]): void {\n\t\tif (list != null) {\n\t\t\tfor (let i = 0, imax = list.length; i < imax; ++i) {\n\t\t\t\taxis.add(list[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\toverride get coordinate(): DChartCoordinateContainer<CHART> {\n\t\treturn this._coordinate;\n\t}\n\n\toverride get series(): DChartSeriesContainer<CHART> {\n\t\treturn this._series;\n\t}\n\n\toverride get container(): DChartPlotAreaContainer {\n\t\treturn this._container;\n\t}\n\n\toverride get axis(): DChartAxisContainer<CHART> {\n\t\treturn this._axis;\n\t}\n\n\toverride newView(options?: OPTIONS): DViewImpl {\n\t\treturn new DViewImpl(this, () => this._container, options?.view);\n\t}\n\n\tprotected override onViewDirty(): void {\n\t\tthis._coordinate.fit();\n\t\tthis._axis.onRender();\n\t\tthis._series.onRender();\n\t}\n\n\toverride fit(\n\t\tduration?: number,\n\t\tdomainFrom?: number,\n\t\tdomainTo?: number,\n\t\trangeFrom?: number,\n\t\trangeTo?: number\n\t): this {\n\t\tconst coordinate = this._coordinate;\n\t\tconst axis = this._axis;\n\t\tconst series = this._series;\n\t\tif (duration != null && duration <= 0) {\n\t\t\tcoordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\taxis.update();\n\t\t\tseries.update();\n\t\t} else {\n\t\t\tthis._blendDuration = duration != null ? duration : 200;\n\t\t\tthis._blendStartTime = Date.now();\n\t\t\tcoordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tconst blendTimeout = this._blendTimeout;\n\t\t\tif (blendTimeout != null) {\n\t\t\t\twindow.clearTimeout(blendTimeout);\n\t\t\t}\n\t\t\tthis._blendTimeout = window.setTimeout(this._onBlendBound, 0);\n\t\t}\n\t\treturn this;\n\t}\n\n\tprotected override onBlend(): void {\n\t\tconst now = Date.now();\n\t\tlet ratio = (now - this._blendStartTime) / this._blendDuration;\n\t\tif (ratio < 1) {\n\t\t\tthis._blendTimeout = window.setTimeout(this._onBlendBound, 0);\n\t\t} else {\n\t\t\tthis._blendTimeout = null;\n\t\t\tratio = 1;\n\t\t}\n\t\tthis._coordinate.blend(DAnimationTimings.ELASTIC(ratio));\n\t\tthis._axis.update();\n\t\tthis._series.update();\n\t}\n\n\toverride destroy(): void {\n\t\tthis._container.destroy();\n\t\tthis._series.destroy();\n\t\tthis._axis.destroy();\n\t}\n}\n"]}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { DChartAxisPosition } from "./d-chart-axis-position";
|
|
6
|
+
import { toEnum } from "./util/to-enum";
|
|
7
|
+
var DChartPlotAreaTwofoldAxisContainer = /** @class */ (function () {
|
|
8
|
+
function DChartPlotAreaTwofoldAxisContainer(plotArea, container, primary, secondary) {
|
|
9
|
+
this._plotArea = plotArea;
|
|
10
|
+
this._container = container;
|
|
11
|
+
this._list = new Map();
|
|
12
|
+
this._primary = primary;
|
|
13
|
+
this._secondary = secondary;
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(DChartPlotAreaTwofoldAxisContainer.prototype, "container", {
|
|
16
|
+
get: function () {
|
|
17
|
+
return this._container;
|
|
18
|
+
},
|
|
19
|
+
enumerable: false,
|
|
20
|
+
configurable: true
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(DChartPlotAreaTwofoldAxisContainer.prototype, "plotArea", {
|
|
23
|
+
get: function () {
|
|
24
|
+
return this._plotArea;
|
|
25
|
+
},
|
|
26
|
+
enumerable: false,
|
|
27
|
+
configurable: true
|
|
28
|
+
});
|
|
29
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.add = function (axis) {
|
|
30
|
+
var list = this._list;
|
|
31
|
+
var axes = list.get(axis.position);
|
|
32
|
+
if (axes == null) {
|
|
33
|
+
axes = [];
|
|
34
|
+
list.set(axis.position, axes);
|
|
35
|
+
}
|
|
36
|
+
axes.push(axis);
|
|
37
|
+
axis.bind(this, axes.length - 1);
|
|
38
|
+
};
|
|
39
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.get = function (position, index) {
|
|
40
|
+
var primary = this._primary;
|
|
41
|
+
var primarySize = primary.size(position);
|
|
42
|
+
if (0 <= index && index < primarySize) {
|
|
43
|
+
return primary.get(position, index);
|
|
44
|
+
}
|
|
45
|
+
var secondary = this._secondary;
|
|
46
|
+
var secondarySize = secondary.size(position);
|
|
47
|
+
if (primarySize <= index && index < primarySize + secondarySize) {
|
|
48
|
+
return secondary.get(position, index);
|
|
49
|
+
}
|
|
50
|
+
var list = this._list;
|
|
51
|
+
var axes = list.get(toEnum(position, DChartAxisPosition));
|
|
52
|
+
if (axes) {
|
|
53
|
+
if (primarySize + secondarySize <= index &&
|
|
54
|
+
index < primarySize + secondarySize + axes.length) {
|
|
55
|
+
return axes[index - primarySize - secondarySize];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return null;
|
|
59
|
+
};
|
|
60
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.indexOf = function (axis) {
|
|
61
|
+
var primary = this._primary;
|
|
62
|
+
var result = primary.indexOf(axis);
|
|
63
|
+
if (0 <= result) {
|
|
64
|
+
return result;
|
|
65
|
+
}
|
|
66
|
+
result = this._secondary.indexOf(axis);
|
|
67
|
+
if (0 <= result) {
|
|
68
|
+
return primary.size(axis.position) + result;
|
|
69
|
+
}
|
|
70
|
+
var list = this._list;
|
|
71
|
+
var axes = list.get(axis.position);
|
|
72
|
+
if (axes) {
|
|
73
|
+
return axes.indexOf(axis);
|
|
74
|
+
}
|
|
75
|
+
return -1;
|
|
76
|
+
};
|
|
77
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.clear = function (position) {
|
|
78
|
+
this._primary.clear(position);
|
|
79
|
+
this._secondary.clear(position);
|
|
80
|
+
var list = this._list;
|
|
81
|
+
var axes = list.get(toEnum(position, DChartAxisPosition));
|
|
82
|
+
if (axes) {
|
|
83
|
+
for (var i = 0, imax = axes.length; i < imax; ++i) {
|
|
84
|
+
axes[i].destroy();
|
|
85
|
+
}
|
|
86
|
+
axes.length = 0;
|
|
87
|
+
}
|
|
88
|
+
return this;
|
|
89
|
+
};
|
|
90
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.size = function (position) {
|
|
91
|
+
var list = this._list;
|
|
92
|
+
var axes = list.get(toEnum(position, DChartAxisPosition));
|
|
93
|
+
return (this._primary.size(position) +
|
|
94
|
+
this._secondary.size(position) +
|
|
95
|
+
(axes != null ? axes.length : 0));
|
|
96
|
+
};
|
|
97
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.update = function () {
|
|
98
|
+
this._primary.update();
|
|
99
|
+
this._secondary.update();
|
|
100
|
+
this._list.forEach(function (axes) {
|
|
101
|
+
for (var i = 0, imax = axes.length; i < imax; ++i) {
|
|
102
|
+
axes[i].update();
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.onRender = function () {
|
|
107
|
+
this._primary.onRender();
|
|
108
|
+
this._secondary.onRender();
|
|
109
|
+
this._list.forEach(function (axes) {
|
|
110
|
+
for (var i = 0, imax = axes.length; i < imax; ++i) {
|
|
111
|
+
axes[i].onRender();
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
DChartPlotAreaTwofoldAxisContainer.prototype.destroy = function () {
|
|
116
|
+
this._primary.destroy();
|
|
117
|
+
this._secondary.destroy();
|
|
118
|
+
this._list.forEach(function (axes) {
|
|
119
|
+
for (var i = 0, imax = axes.length; i < imax; ++i) {
|
|
120
|
+
axes[i].destroy();
|
|
121
|
+
}
|
|
122
|
+
axes.length = 0;
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
return DChartPlotAreaTwofoldAxisContainer;
|
|
126
|
+
}());
|
|
127
|
+
export { DChartPlotAreaTwofoldAxisContainer };
|
|
128
|
+
//# sourceMappingURL=d-chart-plot-area-twofold-axis-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-twofold-axis-container.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-axis-container.ts"],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ourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DChartAxis } from \"./d-chart-axis\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\nimport { DChartPlotArea } from \"./d-chart-plot-area\";\nimport { EShapeContainer } from \"./shape/e-shape-container\";\nimport { toEnum } from \"./util/to-enum\";\n\nexport class DChartPlotAreaTwofoldAxisContainer<CHART extends DBase = DBase>\n\timplements DChartAxisContainer<CHART>\n{\n\tprotected _plotArea: DChartPlotArea<CHART>;\n\tprotected _container: EShapeContainer;\n\tprotected _list: Map<DChartAxisPosition, DChartAxis<CHART>[]>;\n\n\tprotected _primary: DChartAxisContainer<CHART>;\n\tprotected _secondary: DChartAxisContainer<CHART>;\n\n\tconstructor(\n\t\tplotArea: DChartPlotArea<CHART>,\n\t\tcontainer: EShapeContainer,\n\t\tprimary: DChartAxisContainer<CHART>,\n\t\tsecondary: DChartAxisContainer<CHART>\n\t) {\n\t\tthis._plotArea = plotArea;\n\t\tthis._container = container;\n\t\tthis._list = new Map<DChartAxisPosition, DChartAxis<CHART>[]>();\n\t\tthis._primary = primary;\n\t\tthis._secondary = secondary;\n\t}\n\n\tget container(): EShapeContainer {\n\t\treturn this._container;\n\t}\n\n\tget plotArea(): DChartPlotArea<CHART> {\n\t\treturn this._plotArea;\n\t}\n\n\tadd(axis: DChartAxis<CHART>): void {\n\t\tconst list = this._list;\n\t\tlet axes = list.get(axis.position);\n\t\tif (axes == null) {\n\t\t\taxes = [];\n\t\t\tlist.set(axis.position, axes);\n\t\t}\n\t\taxes.push(axis);\n\t\taxis.bind(this, axes.length - 1);\n\t}\n\n\tget(\n\t\tposition: DChartAxisPosition | keyof typeof DChartAxisPosition,\n\t\tindex: number\n\t): DChartAxis<CHART> | null {\n\t\tconst primary = this._primary;\n\t\tconst primarySize = primary.size(position);\n\t\tif (0 <= index && index < primarySize) {\n\t\t\treturn primary.get(position, index);\n\t\t}\n\t\tconst secondary = this._secondary;\n\t\tconst secondarySize = secondary.size(position);\n\t\tif (primarySize <= index && index < primarySize + secondarySize) {\n\t\t\treturn secondary.get(position, index);\n\t\t}\n\t\tconst list = this._list;\n\t\tconst axes = list.get(toEnum(position, DChartAxisPosition));\n\t\tif (axes) {\n\t\t\tif (\n\t\t\t\tprimarySize + secondarySize <= index &&\n\t\t\t\tindex < primarySize + secondarySize + axes.length\n\t\t\t) {\n\t\t\t\treturn axes[index - primarySize - secondarySize];\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tindexOf(axis: DChartAxis<CHART>): number {\n\t\tconst primary = this._primary;\n\t\tlet result = primary.indexOf(axis);\n\t\tif (0 <= result) {\n\t\t\treturn result;\n\t\t}\n\t\tresult = this._secondary.indexOf(axis);\n\t\tif (0 <= result) {\n\t\t\treturn primary.size(axis.position) + result;\n\t\t}\n\t\tconst list = this._list;\n\t\tconst axes = list.get(axis.position);\n\t\tif (axes) {\n\t\t\treturn axes.indexOf(axis);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tclear(position: DChartAxisPosition | keyof typeof DChartAxisPosition): this {\n\t\tthis._primary.clear(position);\n\t\tthis._secondary.clear(position);\n\t\tconst list = this._list;\n\t\tconst axes = list.get(toEnum(position, DChartAxisPosition));\n\t\tif (axes) {\n\t\t\tfor (let i = 0, imax = axes.length; i < imax; ++i) {\n\t\t\t\taxes[i].destroy();\n\t\t\t}\n\t\t\taxes.length = 0;\n\t\t}\n\t\treturn this;\n\t}\n\n\tsize(position: DChartAxisPosition | keyof typeof DChartAxisPosition): number {\n\t\tconst list = this._list;\n\t\tconst axes = list.get(toEnum(position, DChartAxisPosition));\n\t\treturn (\n\t\t\tthis._primary.size(position) +\n\t\t\tthis._secondary.size(position) +\n\t\t\t(axes != null ? axes.length : 0)\n\t\t);\n\t}\n\n\tupdate(): void {\n\t\tthis._primary.update();\n\t\tthis._secondary.update();\n\t\tthis._list.forEach((axes: DChartAxis<CHART>[]): void => {\n\t\t\tfor (let i = 0, imax = axes.length; i < imax; ++i) {\n\t\t\t\taxes[i].update();\n\t\t\t}\n\t\t});\n\t}\n\n\tonRender(): void {\n\t\tthis._primary.onRender();\n\t\tthis._secondary.onRender();\n\t\tthis._list.forEach((axes: DChartAxis<CHART>[]): void => {\n\t\t\tfor (let i = 0, imax = axes.length; i < imax; ++i) {\n\t\t\t\taxes[i].onRender();\n\t\t\t}\n\t\t});\n\t}\n\n\tdestroy(): void {\n\t\tthis._primary.destroy();\n\t\tthis._secondary.destroy();\n\t\tthis._list.forEach((axes: DChartAxis<CHART>[]): void => {\n\t\t\tfor (let i = 0, imax = axes.length; i < imax; ++i) {\n\t\t\t\taxes[i].destroy();\n\t\t\t}\n\t\t\taxes.length = 0;\n\t\t});\n\t}\n}\n"]}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { isNumber } from "./util/is-number";
|
|
6
|
+
var DChartPlotAreaTwofoldCoorinateContainerSub = /** @class */ (function () {
|
|
7
|
+
function DChartPlotAreaTwofoldCoorinateContainerSub(container, primary, secondary) {
|
|
8
|
+
this._container = container;
|
|
9
|
+
this._primary = primary;
|
|
10
|
+
this._secondary = secondary;
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainerSub.prototype, "container", {
|
|
13
|
+
get: function () {
|
|
14
|
+
return this._container;
|
|
15
|
+
},
|
|
16
|
+
enumerable: false,
|
|
17
|
+
configurable: true
|
|
18
|
+
});
|
|
19
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.add = function (coordinate, index) {
|
|
20
|
+
if (index != null) {
|
|
21
|
+
var primary = this._primary;
|
|
22
|
+
var primarySize = primary.size();
|
|
23
|
+
if (index < primarySize) {
|
|
24
|
+
if (0 <= index) {
|
|
25
|
+
primary.add(coordinate, index);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
this._secondary.add(coordinate, index - primarySize);
|
|
30
|
+
}
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
this._secondary.add(coordinate);
|
|
35
|
+
}
|
|
36
|
+
return this;
|
|
37
|
+
};
|
|
38
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.get = function (index) {
|
|
39
|
+
var primary = this._primary;
|
|
40
|
+
var primarySize = primary.size();
|
|
41
|
+
if (0 <= index && index < primarySize) {
|
|
42
|
+
return primary.get(index);
|
|
43
|
+
}
|
|
44
|
+
var secondary = this._secondary;
|
|
45
|
+
var secondarySize = secondary.size();
|
|
46
|
+
if (primarySize <= index && index < primarySize + secondarySize) {
|
|
47
|
+
secondary.get(index - primarySize);
|
|
48
|
+
}
|
|
49
|
+
return null;
|
|
50
|
+
};
|
|
51
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.indexOf = function (coordinate) {
|
|
52
|
+
var result = this._primary.indexOf(coordinate);
|
|
53
|
+
if (0 <= result) {
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
result = this._secondary.indexOf(coordinate);
|
|
57
|
+
if (0 <= result) {
|
|
58
|
+
return this._primary.size() + result;
|
|
59
|
+
}
|
|
60
|
+
return -1;
|
|
61
|
+
};
|
|
62
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.remove = function (coordinateOrIndex) {
|
|
63
|
+
if (isNumber(coordinateOrIndex)) {
|
|
64
|
+
var index = coordinateOrIndex;
|
|
65
|
+
var primary = this._primary;
|
|
66
|
+
var primarySize = primary.size();
|
|
67
|
+
if (0 <= index && index < primarySize) {
|
|
68
|
+
return primary.remove(index);
|
|
69
|
+
}
|
|
70
|
+
var secondary = this._secondary;
|
|
71
|
+
var secondarySize = secondary.size();
|
|
72
|
+
if (primarySize <= index && index < primarySize + secondarySize) {
|
|
73
|
+
secondary.remove(index - primarySize);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
var coordinate = coordinateOrIndex;
|
|
78
|
+
var result = this._primary.remove(coordinate);
|
|
79
|
+
if (result != null) {
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
result = this._secondary.remove(coordinate);
|
|
83
|
+
if (result != null) {
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
};
|
|
89
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.clear = function () {
|
|
90
|
+
this._primary.clear();
|
|
91
|
+
this._secondary.clear();
|
|
92
|
+
return this;
|
|
93
|
+
};
|
|
94
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.destroy = function () {
|
|
95
|
+
return this.clear();
|
|
96
|
+
};
|
|
97
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.size = function () {
|
|
98
|
+
return this._primary.size() + this._secondary.size();
|
|
99
|
+
};
|
|
100
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.fit = function (from, to) {
|
|
101
|
+
this._primary.fit(from, to);
|
|
102
|
+
this._secondary.fit(from, to);
|
|
103
|
+
return this;
|
|
104
|
+
};
|
|
105
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.mark = function (from, to) {
|
|
106
|
+
this._primary.mark(from, to);
|
|
107
|
+
this._secondary.mark(from, to);
|
|
108
|
+
return this;
|
|
109
|
+
};
|
|
110
|
+
DChartPlotAreaTwofoldCoorinateContainerSub.prototype.blend = function (ratio) {
|
|
111
|
+
this._primary.blend(ratio);
|
|
112
|
+
this._secondary.blend(ratio);
|
|
113
|
+
return this;
|
|
114
|
+
};
|
|
115
|
+
return DChartPlotAreaTwofoldCoorinateContainerSub;
|
|
116
|
+
}());
|
|
117
|
+
export { DChartPlotAreaTwofoldCoorinateContainerSub };
|
|
118
|
+
//# sourceMappingURL=d-chart-plot-area-twofold-coordinate-container-sub.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-twofold-coordinate-container-sub.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C;IAOC,oDACC,SAA2C,EAC3C,OAA4C,EAC5C,SAA8C;QAE9C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,sBAAI,iEAAS;aAAb;YACC,OAAO,IAAI,CAAC,UAAU,CAAC;QACxB,CAAC;;;OAAA;IAED,wDAAG,GAAH,UAAI,UAAmC,EAAE,KAAc;QACtD,IAAI,KAAK,IAAI,IAAI,EAAE;YAClB,IAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC9B,IAAM,WAAW,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;YACnC,IAAI,KAAK,GAAG,WAAW,EAAE;gBACxB,IAAI,CAAC,IAAI,KAAK,EAAE;oBACf,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;iBAC/B;aACD;iBAAM;gBACN,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,GAAG,WAAW,CAAC,CAAC;aACrD;YACD,OAAO,IAAI,CAAC;SACZ;aAAM;YACN,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;SAChC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,wDAAG,GAAH,UAAI,KAAa;QAChB,IAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAM,WAAW,GAAG,OAAO,C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C;QAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC/B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,0DAAK,GAAL,UAAM,KAAa;QAClB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC3B,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACb,CAAC;IACF,iDAAC;AAAD,CAAC,AA7HD,IA6HC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DChartCoordinate } from \"./d-chart-coordinate\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartCoordinateContainerSub } from \"./d-chart-coordinate-container-sub\";\nimport { isNumber } from \"./util/is-number\";\n\nexport class DChartPlotAreaTwofoldCoorinateContainerSub<CHART extends DBase = DBase>\n\timplements DChartCoordinateContainerSub<CHART>\n{\n\tprotected _container: DChartCoordinateContainer<CHART>;\n\tprotected _primary: DChartCoordinateContainerSub<CHART>;\n\tprotected _secondary: DChartCoordinateContainerSub<CHART>;\n\n\tconstructor(\n\t\tcontainer: DChartCoordinateContainer<CHART>,\n\t\tprimary: DChartCoordinateContainerSub<CHART>,\n\t\tsecondary: DChartCoordinateContainerSub<CHART>\n\t) {\n\t\tthis._container = container;\n\t\tthis._primary = primary;\n\t\tthis._secondary = secondary;\n\t}\n\n\tget container(): DChartCoordinateContainer<CHART> {\n\t\treturn this._container;\n\t}\n\n\tadd(coordinate: DChartCoordinate<CHART>, index?: number): this {\n\t\tif (index != null) {\n\t\t\tconst primary = this._primary;\n\t\t\tconst primarySize = primary.size();\n\t\t\tif (index < primarySize) {\n\t\t\t\tif (0 <= index) {\n\t\t\t\t\tprimary.add(coordinate, index);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._secondary.add(coordinate, index - primarySize);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else {\n\t\t\tthis._secondary.add(coordinate);\n\t\t}\n\t\treturn this;\n\t}\n\n\tget(index: number): DChartCoordinate<CHART> | null {\n\t\tconst primary = this._primary;\n\t\tconst primarySize = primary.size();\n\t\tif (0 <= index && index < primarySize) {\n\t\t\treturn primary.get(index);\n\t\t}\n\t\tconst secondary = this._secondary;\n\t\tconst secondarySize = secondary.size();\n\t\tif (primarySize <= index && index < primarySize + secondarySize) {\n\t\t\tsecondary.get(index - primarySize);\n\t\t}\n\t\treturn null;\n\t}\n\n\tindexOf(coordinate: DChartCoordinate<CHART>): number {\n\t\tlet result = this._primary.indexOf(coordinate);\n\t\tif (0 <= result) {\n\t\t\treturn result;\n\t\t}\n\t\tresult = this._secondary.indexOf(coordinate);\n\t\tif (0 <= result) {\n\t\t\treturn this._primary.size() + result;\n\t\t}\n\t\treturn -1;\n\t}\n\n\tremove(coordinate: DChartCoordinate<CHART>): DChartCoordinate<CHART> | null;\n\tremove(index: number): DChartCoordinate<CHART> | null;\n\tremove(coordinateOrIndex: DChartCoordinate<CHART> | number): DChartCoordinate<CHART> | null {\n\t\tif (isNumber(coordinateOrIndex)) {\n\t\t\tconst index = coordinateOrIndex;\n\t\t\tconst primary = this._primary;\n\t\t\tconst primarySize = primary.size();\n\t\t\tif (0 <= index && index < primarySize) {\n\t\t\t\treturn primary.remove(index);\n\t\t\t}\n\t\t\tconst secondary = this._secondary;\n\t\t\tconst secondarySize = secondary.size();\n\t\t\tif (primarySize <= index && index < primarySize + secondarySize) {\n\t\t\t\tsecondary.remove(index - primarySize);\n\t\t\t}\n\t\t} else {\n\t\t\tconst coordinate = coordinateOrIndex;\n\t\t\tlet result = this._primary.remove(coordinate);\n\t\t\tif (result != null) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tresult = this._secondary.remove(coordinate);\n\t\t\tif (result != null) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tclear(): this {\n\t\tthis._primary.clear();\n\t\tthis._secondary.clear();\n\t\treturn this;\n\t}\n\n\tdestroy(): this {\n\t\treturn this.clear();\n\t}\n\n\tsize(): number {\n\t\treturn this._primary.size() + this._secondary.size();\n\t}\n\n\tfit(from?: number, to?: number): this {\n\t\tthis._primary.fit(from, to);\n\t\tthis._secondary.fit(from, to);\n\t\treturn this;\n\t}\n\n\tmark(from?: number, to?: number): this {\n\t\tthis._primary.mark(from, to);\n\t\tthis._secondary.mark(from, to);\n\t\treturn this;\n\t}\n\n\tblend(ratio: number): this {\n\t\tthis._primary.blend(ratio);\n\t\tthis._secondary.blend(ratio);\n\t\treturn this;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { DChartPlotAreaTwofoldCoorinateContainerSub } from "./d-chart-plot-area-twofold-coordinate-container-sub";
|
|
6
|
+
var DChartPlotAreaTwofoldCoorinateContainer = /** @class */ (function () {
|
|
7
|
+
function DChartPlotAreaTwofoldCoorinateContainer(plotArea, primary, secondary) {
|
|
8
|
+
this._plotArea = plotArea;
|
|
9
|
+
this._primary = primary;
|
|
10
|
+
this._secondary = secondary;
|
|
11
|
+
this._x = new DChartPlotAreaTwofoldCoorinateContainerSub(this, primary.x, secondary.x);
|
|
12
|
+
this._y = new DChartPlotAreaTwofoldCoorinateContainerSub(this, primary.y, secondary.y);
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "x", {
|
|
15
|
+
get: function () {
|
|
16
|
+
return this._x;
|
|
17
|
+
},
|
|
18
|
+
enumerable: false,
|
|
19
|
+
configurable: true
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "y", {
|
|
22
|
+
get: function () {
|
|
23
|
+
return this._y;
|
|
24
|
+
},
|
|
25
|
+
enumerable: false,
|
|
26
|
+
configurable: true
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(DChartPlotAreaTwofoldCoorinateContainer.prototype, "plotArea", {
|
|
29
|
+
get: function () {
|
|
30
|
+
return this._plotArea;
|
|
31
|
+
},
|
|
32
|
+
enumerable: false,
|
|
33
|
+
configurable: true
|
|
34
|
+
});
|
|
35
|
+
DChartPlotAreaTwofoldCoorinateContainer.prototype.fit = function (domainFrom, domainTo, rangeFrom, rangeTo) {
|
|
36
|
+
this._x.fit(domainFrom, domainTo);
|
|
37
|
+
this._y.fit(rangeFrom, rangeTo);
|
|
38
|
+
return this;
|
|
39
|
+
};
|
|
40
|
+
DChartPlotAreaTwofoldCoorinateContainer.prototype.mark = function (domainFrom, domainTo, rangeFrom, rangeTo) {
|
|
41
|
+
this._x.mark(domainFrom, domainTo);
|
|
42
|
+
this._y.mark(rangeFrom, rangeTo);
|
|
43
|
+
return this;
|
|
44
|
+
};
|
|
45
|
+
DChartPlotAreaTwofoldCoorinateContainer.prototype.blend = function (ratio) {
|
|
46
|
+
this._x.blend(ratio);
|
|
47
|
+
this._y.blend(ratio);
|
|
48
|
+
return this;
|
|
49
|
+
};
|
|
50
|
+
return DChartPlotAreaTwofoldCoorinateContainer;
|
|
51
|
+
}());
|
|
52
|
+
export { DChartPlotAreaTwofoldCoorinateContainer };
|
|
53
|
+
//# sourceMappingURL=d-chart-plot-area-twofold-coordinate-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-twofold-coordinate-container.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,0CAA0C,EAAE,MAAM,sDAAsD,CAAC;AAElH;IASC,iDACC,QAA+B,EAC/B,OAAyC,EACzC,SAA2C;QAE3C,IAAI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AC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IACF,8CAAC;AAAD,CAAC,AAlDD,IAkDC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartCoordinateContainerSub } from \"./d-chart-coordinate-container-sub\";\nimport { DChartPlotArea } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaTwofoldCoorinateContainerSub } from \"./d-chart-plot-area-twofold-coordinate-container-sub\";\n\nexport class DChartPlotAreaTwofoldCoorinateContainer<CHART extends DBase = DBase>\n\timplements DChartCoordinateContainer<CHART>\n{\n\tprotected _x: DChartCoordinateContainerSub<CHART>;\n\tprotected _y: DChartCoordinateContainerSub<CHART>;\n\tprotected _plotArea: DChartPlotArea<CHART>;\n\tprotected _primary: DChartCoordinateContainer<CHART>;\n\tprotected _secondary: DChartCoordinateContainer<CHART>;\n\n\tconstructor(\n\t\tplotArea: DChartPlotArea<CHART>,\n\t\tprimary: DChartCoordinateContainer<CHART>,\n\t\tsecondary: DChartCoordinateContainer<CHART>\n\t) {\n\t\tthis._plotArea = plotArea;\n\t\tthis._primary = primary;\n\t\tthis._secondary = secondary;\n\t\tthis._x = new DChartPlotAreaTwofoldCoorinateContainerSub(this, primary.x, secondary.x);\n\t\tthis._y = new DChartPlotAreaTwofoldCoorinateContainerSub(this, primary.y, secondary.y);\n\t}\n\n\tget x(): DChartCoordinateContainerSub<CHART> {\n\t\treturn this._x;\n\t}\n\n\tget y(): DChartCoordinateContainerSub<CHART> {\n\t\treturn this._y;\n\t}\n\n\tget plotArea(): DChartPlotArea<CHART> {\n\t\treturn this._plotArea;\n\t}\n\n\tfit(domainFrom?: number, domainTo?: number, rangeFrom?: number, rangeTo?: number): this {\n\t\tthis._x.fit(domainFrom, domainTo);\n\t\tthis._y.fit(rangeFrom, rangeTo);\n\t\treturn this;\n\t}\n\n\tmark(domainFrom?: number, domainTo?: number, rangeFrom?: number, rangeTo?: number): this {\n\t\tthis._x.mark(domainFrom, domainTo);\n\t\tthis._y.mark(rangeFrom, rangeTo);\n\t\treturn this;\n\t}\n\n\tblend(ratio: number): this {\n\t\tthis._x.blend(ratio);\n\t\tthis._y.blend(ratio);\n\t\treturn this;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { __extends } from "tslib";
|
|
6
|
+
import { DBaseOverflowMaskSimple } from "./d-base-overflow-mask-simple";
|
|
7
|
+
var DChartPlotAreaTwofoldOverflowMaskPrimary = /** @class */ (function (_super) {
|
|
8
|
+
__extends(DChartPlotAreaTwofoldOverflowMaskPrimary, _super);
|
|
9
|
+
function DChartPlotAreaTwofoldOverflowMaskPrimary() {
|
|
10
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
DChartPlotAreaTwofoldOverflowMaskPrimary.prototype.onReflow = function (base, width, height) {
|
|
13
|
+
if (this._isInitialized && this._width === width && this._height === height) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
this._isInitialized = true;
|
|
17
|
+
this._width = width;
|
|
18
|
+
this._height = height;
|
|
19
|
+
var hh = height * 0.5;
|
|
20
|
+
this.clear();
|
|
21
|
+
this.beginFill(0xffffff, 1);
|
|
22
|
+
this.drawRect(0, 0, width, hh);
|
|
23
|
+
this.endFill();
|
|
24
|
+
};
|
|
25
|
+
return DChartPlotAreaTwofoldOverflowMaskPrimary;
|
|
26
|
+
}(DBaseOverflowMaskSimple));
|
|
27
|
+
export { DChartPlotAreaTwofoldOverflowMaskPrimary };
|
|
28
|
+
//# sourceMappingURL=d-chart-plot-area-twofold-overflow-mask-primary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-twofold-overflow-mask-primary.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE;IAA8D,4DAAuB;IAArF;;IAeA,CAAC;IAdS,2DAAQ,GAAjB,UAAkB,IAAW,EAAE,KAAa,EAAE,MAAc;QAC3D,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM,EAAE;YAC5E,OAAO;SACP;QACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAM,EAAE,GAAG,MAAM,GAAG,GAAG,CAAC;QAExB,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QAC/B,IAAI,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;IACF,+CAAC;AAAD,CAAC,AAfD,CAA8D,uBAAuB,GAepF","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DBaseOverflowMaskSimple } from \"./d-base-overflow-mask-simple\";\n\nexport class DChartPlotAreaTwofoldOverflowMaskPrimary extends DBaseOverflowMaskSimple {\n\toverride onReflow(base: DBase, width: number, height: number): void {\n\t\tif (this._isInitialized && this._width === width && this._height === height) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isInitialized = true;\n\t\tthis._width = width;\n\t\tthis._height = height;\n\t\tconst hh = height * 0.5;\n\n\t\tthis.clear();\n\t\tthis.beginFill(0xffffff, 1);\n\t\tthis.drawRect(0, 0, width, hh);\n\t\tthis.endFill();\n\t}\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { __extends } from "tslib";
|
|
6
|
+
import { DBaseOverflowMaskSimple } from "./d-base-overflow-mask-simple";
|
|
7
|
+
var DChartPlotAreaTwofoldOverflowMaskSecondary = /** @class */ (function (_super) {
|
|
8
|
+
__extends(DChartPlotAreaTwofoldOverflowMaskSecondary, _super);
|
|
9
|
+
function DChartPlotAreaTwofoldOverflowMaskSecondary() {
|
|
10
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
DChartPlotAreaTwofoldOverflowMaskSecondary.prototype.onReflow = function (base, width, height) {
|
|
13
|
+
if (this._isInitialized && this._width === width && this._height === height) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
this._isInitialized = true;
|
|
17
|
+
this._width = width;
|
|
18
|
+
this._height = height;
|
|
19
|
+
var hh = height * 0.5;
|
|
20
|
+
this.clear();
|
|
21
|
+
this.beginFill(0xffffff, 1);
|
|
22
|
+
this.drawRect(0, hh, width, hh);
|
|
23
|
+
this.endFill();
|
|
24
|
+
};
|
|
25
|
+
return DChartPlotAreaTwofoldOverflowMaskSecondary;
|
|
26
|
+
}(DBaseOverflowMaskSimple));
|
|
27
|
+
export { DChartPlotAreaTwofoldOverflowMaskSecondary };
|
|
28
|
+
//# sourceMappingURL=d-chart-plot-area-twofold-overflow-mask-secondary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-twofold-overflow-mask-secondary.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE;IAAgE,8DAAuB;IAAvF;;IAeA,CAAC;IAdS,6DAAQ,GAAjB,UAAkB,IAAW,EAAE,KAAa,EAAE,MAAc;QAC3D,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM,EAAE;YAC5E,OAAO;SACP;QACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAM,EAAE,GAAG,MAAM,GAAG,GAAG,CAAC;QAExB,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;IACF,iDAAC;AAAD,CAAC,AAfD,CAAgE,uBAAuB,GAetF","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DBaseOverflowMaskSimple } from \"./d-base-overflow-mask-simple\";\n\nexport class DChartPlotAreaTwofoldOverflowMaskSecondary extends DBaseOverflowMaskSimple {\n\toverride onReflow(base: DBase, width: number, height: number): void {\n\t\tif (this._isInitialized && this._width === width && this._height === height) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isInitialized = true;\n\t\tthis._width = width;\n\t\tthis._height = height;\n\t\tconst hh = height * 0.5;\n\n\t\tthis.clear();\n\t\tthis.beginFill(0xffffff, 1);\n\t\tthis.drawRect(0, hh, width, hh);\n\t\tthis.endFill();\n\t}\n}\n"]}
|