@wcardinal/wcardinal-ui 0.417.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/types/wcardinal/ui/util/dynamic-font-atlas-font.d.ts +1 -0
- package/dist/types/wcardinal/ui/util/dynamic-sdf-font-atlas-font.d.ts +12 -0
- package/dist/types/wcardinal/ui/util/dynamic-sdf-font-atlas.d.ts +2 -9
- package/dist/types/wcardinal/ui/util/index.d.ts +1 -0
- package/dist/types/wcardinal/ui/util/util-font.d.ts +7 -2
- 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/dark/d-theme-dark-font.js +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-font.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/white/d-theme-white-font.js +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-font.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-font-atlas-font.js +3 -4
- package/dist/wcardinal/ui/util/dynamic-font-atlas-font.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-font-atlas.js +5 -3
- package/dist/wcardinal/ui/util/dynamic-font-atlas.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas-font.js +30 -0
- package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas-font.js.map +1 -0
- package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js +13 -27
- package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js.map +1 -1
- package/dist/wcardinal/ui/util/index.js +1 -0
- package/dist/wcardinal/ui/util/index.js.map +1 -1
- package/dist/wcardinal/ui/util/util-font.js +14 -21
- package/dist/wcardinal/ui/util/util-font.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +5 -2
- 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 +5 -2
- 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 +5 -2
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +5 -2
- 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 +5 -2
- 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 +5 -2
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +1391 -337
- package/dist/wcardinal-ui.js +1383 -335
- 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,186 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { DChartRegionImpl } from "./d-chart-region-impl";
|
|
6
|
+
import { DChartSeriesHitResult } from "./d-chart-series";
|
|
7
|
+
var DChartPlotAreaTwofoldSeriesContainer = /** @class */ (function () {
|
|
8
|
+
function DChartPlotAreaTwofoldSeriesContainer(plotArea, primary, secondary) {
|
|
9
|
+
this._plotArea = plotArea;
|
|
10
|
+
this._primary = primary;
|
|
11
|
+
this._secondary = secondary;
|
|
12
|
+
this._domain = new DChartRegionImpl(NaN, NaN);
|
|
13
|
+
this._range = new DChartRegionImpl(NaN, NaN);
|
|
14
|
+
}
|
|
15
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.newFill = function (index, options) {
|
|
16
|
+
return this._secondary.newFill(index, options);
|
|
17
|
+
};
|
|
18
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.newStroke = function (index, options) {
|
|
19
|
+
return this._secondary.newStroke(index, options);
|
|
20
|
+
};
|
|
21
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.newSize = function (index, options, x, y) {
|
|
22
|
+
return this._secondary.newSize(index, options, x, y);
|
|
23
|
+
};
|
|
24
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.newOffset = function (index, options, x, y) {
|
|
25
|
+
return this._secondary.newOffset(index, options, x, y);
|
|
26
|
+
};
|
|
27
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.newPadding = function (index, options) {
|
|
28
|
+
return this._secondary.newPadding(index, options);
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "plotArea", {
|
|
31
|
+
get: function () {
|
|
32
|
+
return this._plotArea;
|
|
33
|
+
},
|
|
34
|
+
enumerable: false,
|
|
35
|
+
configurable: true
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "selection", {
|
|
38
|
+
get: function () {
|
|
39
|
+
return this._secondary.selection;
|
|
40
|
+
},
|
|
41
|
+
enumerable: false,
|
|
42
|
+
configurable: true
|
|
43
|
+
});
|
|
44
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.update = function () {
|
|
45
|
+
this._primary.update();
|
|
46
|
+
this._secondary.update();
|
|
47
|
+
var selection = this._secondary.selection;
|
|
48
|
+
if (selection) {
|
|
49
|
+
selection.update();
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.onRender = function () {
|
|
53
|
+
this._primary.onRender();
|
|
54
|
+
this._secondary.onRender();
|
|
55
|
+
var selection = this._secondary.selection;
|
|
56
|
+
if (selection) {
|
|
57
|
+
selection.onRender();
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.add = function (series) {
|
|
61
|
+
this._secondary.add(series);
|
|
62
|
+
};
|
|
63
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.get = function (index) {
|
|
64
|
+
var primary = this._primary;
|
|
65
|
+
var primarySize = primary.size();
|
|
66
|
+
if (0 <= index && index < primarySize) {
|
|
67
|
+
return primary.get(index);
|
|
68
|
+
}
|
|
69
|
+
var secondary = this._secondary;
|
|
70
|
+
var secondarySize = secondary.size();
|
|
71
|
+
if (primarySize <= index && index < primarySize + secondarySize) {
|
|
72
|
+
return secondary.get(index - primarySize);
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
};
|
|
76
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.indexOf = function (series) {
|
|
77
|
+
var primary = this._primary;
|
|
78
|
+
var result = primary.indexOf(series);
|
|
79
|
+
if (0 <= result) {
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
result = this._secondary.indexOf(series);
|
|
83
|
+
if (0 <= result) {
|
|
84
|
+
return primary.size() + result;
|
|
85
|
+
}
|
|
86
|
+
return -1;
|
|
87
|
+
};
|
|
88
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.clear = function () {
|
|
89
|
+
this._primary.clear();
|
|
90
|
+
this._secondary.clear();
|
|
91
|
+
return this;
|
|
92
|
+
};
|
|
93
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.size = function () {
|
|
94
|
+
return this._primary.size() + this._secondary.size();
|
|
95
|
+
};
|
|
96
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.destroy = function () {
|
|
97
|
+
this.clear();
|
|
98
|
+
var selection = this._secondary.selection;
|
|
99
|
+
if (selection) {
|
|
100
|
+
selection.unbind();
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.getDomain = function (coordinate, result) {
|
|
104
|
+
this._primary.getDomain(coordinate, result);
|
|
105
|
+
var from = result.from;
|
|
106
|
+
var to = result.to;
|
|
107
|
+
this._secondary.getDomain(coordinate, result);
|
|
108
|
+
result.add(from, to);
|
|
109
|
+
return result;
|
|
110
|
+
};
|
|
111
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.getRange = function (coordinate, result) {
|
|
112
|
+
result.clear();
|
|
113
|
+
this._primary.getRange(coordinate, result);
|
|
114
|
+
var from = result.from;
|
|
115
|
+
var to = result.to;
|
|
116
|
+
this._secondary.getRange(coordinate, result);
|
|
117
|
+
result.add(from, to);
|
|
118
|
+
return result;
|
|
119
|
+
};
|
|
120
|
+
Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "domain", {
|
|
121
|
+
get: function () {
|
|
122
|
+
var result = this._domain;
|
|
123
|
+
result.clear();
|
|
124
|
+
var pdomain = this._primary.domain;
|
|
125
|
+
result.add(pdomain.from, pdomain.to);
|
|
126
|
+
var sdomain = this._secondary.domain;
|
|
127
|
+
result.add(sdomain.from, sdomain.to);
|
|
128
|
+
return result;
|
|
129
|
+
},
|
|
130
|
+
enumerable: false,
|
|
131
|
+
configurable: true
|
|
132
|
+
});
|
|
133
|
+
Object.defineProperty(DChartPlotAreaTwofoldSeriesContainer.prototype, "range", {
|
|
134
|
+
get: function () {
|
|
135
|
+
var result = this._domain;
|
|
136
|
+
result.clear();
|
|
137
|
+
var prange = this._primary.range;
|
|
138
|
+
result.add(prange.from, prange.to);
|
|
139
|
+
var srange = this._secondary.range;
|
|
140
|
+
result.add(srange.from, srange.to);
|
|
141
|
+
return result;
|
|
142
|
+
},
|
|
143
|
+
enumerable: false,
|
|
144
|
+
configurable: true
|
|
145
|
+
});
|
|
146
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.hitTest = function (x, y) {
|
|
147
|
+
var result = this._secondary.hitTest(x, y);
|
|
148
|
+
if (result != null) {
|
|
149
|
+
return result;
|
|
150
|
+
}
|
|
151
|
+
return this._primary.hitTest(x, y);
|
|
152
|
+
};
|
|
153
|
+
DChartPlotAreaTwofoldSeriesContainer.prototype.calcHitPoint = function (x, y, result) {
|
|
154
|
+
var _a;
|
|
155
|
+
var result1 = result;
|
|
156
|
+
var result2 = ((_a = DChartPlotAreaTwofoldSeriesContainer.WORK_CALCHITPOINT) !== null && _a !== void 0 ? _a : (DChartPlotAreaTwofoldSeriesContainer.WORK_CALCHITPOINT = new DChartSeriesHitResult()));
|
|
157
|
+
var series2 = this._secondary.calcHitPoint(x, y, result2);
|
|
158
|
+
var series1 = this._primary.calcHitPoint(x, y, result1);
|
|
159
|
+
if (series1 != null) {
|
|
160
|
+
if (series2 != null) {
|
|
161
|
+
if (result1.distance <= result2.distance) {
|
|
162
|
+
return series1;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
result1.copyFrom(result2);
|
|
166
|
+
return series2;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
return series1;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
if (series2 != null) {
|
|
175
|
+
result1.copyFrom(result2);
|
|
176
|
+
return series2;
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
return DChartPlotAreaTwofoldSeriesContainer;
|
|
184
|
+
}());
|
|
185
|
+
export { DChartPlotAreaTwofoldSeriesContainer };
|
|
186
|
+
//# sourceMappingURL=d-chart-plot-area-twofold-series-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-twofold-series-container.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-series-container.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAgB,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAoBvE;IAYC,8CACC,QAA+B,EAC/B,OAAyC,EACzC,SAA2C;QAE3C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAE5B,IAAI,CAAC,OAAO,GAAG,IAAI,gBAAgB,CAAC,GAAG,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MAAM,IAAI,IAAI,EAAE;YACnB,OAAO,MAAM,CAAC;SACd;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpC,CAAC;IAED,2DAAY,GAAZ,UAAa,CAAS,EAAE,CAAS,EAAE,MAA6B;;QAC/D,IAAM,OAAO,GAAG,MAAM,CAAC;QACvB,IAAM,OAAO,GAAG,OAAC,oCAAoC,CAAC,iBAAiB,oCAAtD,oCAAoC,CAAC,iBAAiB,GACtE,IAAI,qBAAqB,EAAE,EAAC,CAAC;QAC9B,IAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;QAC5D,IAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;QAC1D,IAAI,OAAO,IAAI,IAAI,EAAE;YACpB,IAAI,OAAO,IAAI,IAAI,EAAE;gBACpB,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,EAAE;oBACzC,OAAO,OAAO,CAAC;iBACf;qBAAM;oBACN,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;oBAC1B,OAAO,OAAO,CAAC;iBACf;aACD;iBAAM;gBACN,OAAO,OAAO,CAAC;aACf;SACD;aAAM;YACN,IAAI,OAAO,IAAI,IAAI,EAAE;gBACpB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBAC1B,OAAO,OAAO,CAAC;aACf;iBAAM;gBACN,OAAO,IAAI,CAAC;aACZ;SACD;IACF,CAAC;IACF,2CAAC;AAAD,CAAC,AA7ND,IA6NC","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 { DChartPlotArea } from \"./d-chart-plot-area\";\nimport { DChartRegion } from \"./d-chart-region\";\nimport { DChartRegionImpl } from \"./d-chart-region-impl\";\nimport { DChartSelection } from \"./d-chart-selection\";\nimport { DChartSeries, DChartSeriesHitResult } from \"./d-chart-series\";\nimport { DChartSeriesContainer } from \"./d-chart-series-container\";\nimport { DChartSeriesContainerImpl } from \"./d-chart-series-container-impl\";\nimport {\n\tDChartSeriesFillComputed,\n\tDChartSeriesFillComputedOptions\n} from \"./d-chart-series-fill-computed\";\nimport {\n\tDChartSeriesPaddingComputed,\n\tDChartSeriesPaddingComputedOptions\n} from \"./d-chart-series-padding-computed\";\nimport {\n\tDChartSeriesPointComputed,\n\tDChartSeriesPointComputedOptions\n} from \"./d-chart-series-point-computed\";\nimport {\n\tDChartSeriesStrokeComputed,\n\tDChartSeriesStrokeComputedOptions\n} from \"./d-chart-series-stroke-computed\";\n\nexport class DChartPlotAreaTwofoldSeriesContainer<CHART extends DBase = DBase>\n\timplements DChartSeriesContainer<CHART>\n{\n\tprotected static WORK_CALCHITPOINT: DChartSeriesHitResult | undefined;\n\n\tprotected _plotArea: DChartPlotArea<CHART>;\n\tprotected _primary: DChartSeriesContainerImpl<CHART>;\n\tprotected _secondary: DChartSeriesContainerImpl<CHART>;\n\n\tprotected _domain: DChartRegionImpl;\n\tprotected _range: DChartRegionImpl;\n\n\tconstructor(\n\t\tplotArea: DChartPlotArea<CHART>,\n\t\tprimary: DChartSeriesContainerImpl<CHART>,\n\t\tsecondary: DChartSeriesContainerImpl<CHART>\n\t) {\n\t\tthis._plotArea = plotArea;\n\t\tthis._primary = primary;\n\t\tthis._secondary = secondary;\n\n\t\tthis._domain = new DChartRegionImpl(NaN, NaN);\n\t\tthis._range = new DChartRegionImpl(NaN, NaN);\n\t}\n\n\tnewFill(\n\t\tindex: number,\n\t\toptions: DChartSeriesFillComputedOptions | undefined\n\t): DChartSeriesFillComputed {\n\t\treturn this._secondary.newFill(index, options);\n\t}\n\n\tnewStroke(\n\t\tindex: number,\n\t\toptions: DChartSeriesStrokeComputedOptions | undefined\n\t): DChartSeriesStrokeComputed {\n\t\treturn this._secondary.newStroke(index, options);\n\t}\n\n\tnewSize(\n\t\tindex: number,\n\t\toptions: DChartSeriesPointComputedOptions | undefined,\n\t\tx: number,\n\t\ty: number\n\t): DChartSeriesPointComputed {\n\t\treturn this._secondary.newSize(index, options, x, y);\n\t}\n\n\tnewOffset(\n\t\tindex: number,\n\t\toptions: DChartSeriesPointComputedOptions | undefined,\n\t\tx: number,\n\t\ty: number\n\t): DChartSeriesPointComputed {\n\t\treturn this._secondary.newOffset(index, options, x, y);\n\t}\n\n\tnewPadding(\n\t\tindex: number,\n\t\toptions: DChartSeriesPaddingComputedOptions | undefined\n\t): DChartSeriesPaddingComputed {\n\t\treturn this._secondary.newPadding(index, options);\n\t}\n\n\tget plotArea(): DChartPlotArea<CHART> {\n\t\treturn this._plotArea;\n\t}\n\n\tget selection(): DChartSelection<CHART> | null {\n\t\treturn this._secondary.selection;\n\t}\n\n\tupdate(): void {\n\t\tthis._primary.update();\n\t\tthis._secondary.update();\n\t\tconst selection = this._secondary.selection;\n\t\tif (selection) {\n\t\t\tselection.update();\n\t\t}\n\t}\n\n\tonRender(): void {\n\t\tthis._primary.onRender();\n\t\tthis._secondary.onRender();\n\t\tconst selection = this._secondary.selection;\n\t\tif (selection) {\n\t\t\tselection.onRender();\n\t\t}\n\t}\n\n\tadd(series: DChartSeries<CHART>): void {\n\t\tthis._secondary.add(series);\n\t}\n\n\tget(index: number): DChartSeries<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\treturn secondary.get(index - primarySize);\n\t\t}\n\t\treturn null;\n\t}\n\n\tindexOf(series: DChartSeries<CHART>): number {\n\t\tconst primary = this._primary;\n\t\tlet result = primary.indexOf(series);\n\t\tif (0 <= result) {\n\t\t\treturn result;\n\t\t}\n\t\tresult = this._secondary.indexOf(series);\n\t\tif (0 <= result) {\n\t\t\treturn primary.size() + result;\n\t\t}\n\t\treturn -1;\n\t}\n\n\tclear(): this {\n\t\tthis._primary.clear();\n\t\tthis._secondary.clear();\n\t\treturn this;\n\t}\n\n\tsize(): number {\n\t\treturn this._primary.size() + this._secondary.size();\n\t}\n\n\tdestroy(): void {\n\t\tthis.clear();\n\t\tconst selection = this._secondary.selection;\n\t\tif (selection) {\n\t\t\tselection.unbind();\n\t\t}\n\t}\n\n\tgetDomain(coordinate: DChartCoordinate<CHART>, result: DChartRegion): DChartRegion {\n\t\tthis._primary.getDomain(coordinate, result);\n\t\tconst from = result.from;\n\t\tconst to = result.to;\n\n\t\tthis._secondary.getDomain(coordinate, result);\n\t\tresult.add(from, to);\n\t\treturn result;\n\t}\n\n\tgetRange(coordinate: DChartCoordinate<CHART>, result: DChartRegion): DChartRegion {\n\t\tresult.clear();\n\n\t\tthis._primary.getRange(coordinate, result);\n\t\tconst from = result.from;\n\t\tconst to = result.to;\n\n\t\tthis._secondary.getRange(coordinate, result);\n\t\tresult.add(from, to);\n\t\treturn result;\n\t}\n\n\tget domain(): DChartRegion {\n\t\tconst result = this._domain;\n\t\tresult.clear();\n\n\t\tconst pdomain = this._primary.domain;\n\t\tresult.add(pdomain.from, pdomain.to);\n\n\t\tconst sdomain = this._secondary.domain;\n\t\tresult.add(sdomain.from, sdomain.to);\n\n\t\treturn result;\n\t}\n\n\tget range(): DChartRegion {\n\t\tconst result = this._domain;\n\t\tresult.clear();\n\n\t\tconst prange = this._primary.range;\n\t\tresult.add(prange.from, prange.to);\n\n\t\tconst srange = this._secondary.range;\n\t\tresult.add(srange.from, srange.to);\n\n\t\treturn result;\n\t}\n\n\thitTest(x: number, y: number): DChartSeries<CHART> | null {\n\t\tconst result = this._secondary.hitTest(x, y);\n\t\tif (result != null) {\n\t\t\treturn result;\n\t\t}\n\t\treturn this._primary.hitTest(x, y);\n\t}\n\n\tcalcHitPoint(x: number, y: number, result: DChartSeriesHitResult): DChartSeries<CHART> | null {\n\t\tconst result1 = result;\n\t\tconst result2 = (DChartPlotAreaTwofoldSeriesContainer.WORK_CALCHITPOINT ??=\n\t\t\tnew DChartSeriesHitResult());\n\t\tconst series2 = this._secondary.calcHitPoint(x, y, result2);\n\t\tconst series1 = this._primary.calcHitPoint(x, y, result1);\n\t\tif (series1 != null) {\n\t\t\tif (series2 != null) {\n\t\t\t\tif (result1.distance <= result2.distance) {\n\t\t\t\t\treturn series1;\n\t\t\t\t} else {\n\t\t\t\t\tresult1.copyFrom(result2);\n\t\t\t\t\treturn series2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn series1;\n\t\t\t}\n\t\t} else {\n\t\t\tif (series2 != null) {\n\t\t\t\tresult1.copyFrom(result2);\n\t\t\t\treturn series2;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { DChartPlotAreaContainer } from "./d-chart-plot-area-container";
|
|
6
|
+
import { DChartSeriesContainerImpl } from "./d-chart-series-container-impl";
|
|
7
|
+
import { DChartAxisContainerImpl } from "./d-chart-axis-container-impl";
|
|
8
|
+
import { DChartCoordinateContainerImpl } from "./d-chart-coordinate-container-impl";
|
|
9
|
+
import { Point, Rectangle } from "pixi.js";
|
|
10
|
+
var DChartPlotAreaTwofoldSubBase = /** @class */ (function () {
|
|
11
|
+
function DChartPlotAreaTwofoldSubBase(plotArea, onContainerChange, mask, margin, axisShapeContainer, options) {
|
|
12
|
+
this._isContainerBoundsDirty = true;
|
|
13
|
+
this._containerBounds = new Rectangle();
|
|
14
|
+
this._workPoint = new Point();
|
|
15
|
+
this._margin = margin;
|
|
16
|
+
this._plotArea = plotArea;
|
|
17
|
+
// Container
|
|
18
|
+
var container = new DChartPlotAreaContainer(onContainerChange);
|
|
19
|
+
this._container = container;
|
|
20
|
+
// Coordinate
|
|
21
|
+
this._coordinate = new DChartCoordinateContainerImpl(this, options === null || options === void 0 ? void 0 : options.coordinate);
|
|
22
|
+
// Overflow mask
|
|
23
|
+
if (mask) {
|
|
24
|
+
container.mask = this.getOverflowMask();
|
|
25
|
+
}
|
|
26
|
+
// Series
|
|
27
|
+
this._series = new DChartSeriesContainerImpl(this, options === null || options === void 0 ? void 0 : options.series);
|
|
28
|
+
// Axis
|
|
29
|
+
this._axis = new DChartAxisContainerImpl(this, axisShapeContainer, options === null || options === void 0 ? void 0 : options.axis);
|
|
30
|
+
}
|
|
31
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "plotArea", {
|
|
32
|
+
get: function () {
|
|
33
|
+
return this._plotArea;
|
|
34
|
+
},
|
|
35
|
+
enumerable: false,
|
|
36
|
+
configurable: true
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "chart", {
|
|
39
|
+
get: function () {
|
|
40
|
+
return this._plotArea.chart;
|
|
41
|
+
},
|
|
42
|
+
enumerable: false,
|
|
43
|
+
configurable: true
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "container", {
|
|
46
|
+
get: function () {
|
|
47
|
+
return this._container;
|
|
48
|
+
},
|
|
49
|
+
enumerable: false,
|
|
50
|
+
configurable: true
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "series", {
|
|
53
|
+
get: function () {
|
|
54
|
+
return this._series;
|
|
55
|
+
},
|
|
56
|
+
enumerable: false,
|
|
57
|
+
configurable: true
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "coordinate", {
|
|
60
|
+
get: function () {
|
|
61
|
+
return this._coordinate;
|
|
62
|
+
},
|
|
63
|
+
enumerable: false,
|
|
64
|
+
configurable: true
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "axis", {
|
|
67
|
+
get: function () {
|
|
68
|
+
return this._axis;
|
|
69
|
+
},
|
|
70
|
+
enumerable: false,
|
|
71
|
+
configurable: true
|
|
72
|
+
});
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
74
|
+
DChartPlotAreaTwofoldSubBase.prototype.on = function (name, callback, context) {
|
|
75
|
+
this._plotArea.on(name, callback, context);
|
|
76
|
+
return this;
|
|
77
|
+
};
|
|
78
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
79
|
+
DChartPlotAreaTwofoldSubBase.prototype.off = function (name, callback, context) {
|
|
80
|
+
this._plotArea.off(name, callback, context);
|
|
81
|
+
return this;
|
|
82
|
+
};
|
|
83
|
+
DChartPlotAreaTwofoldSubBase.prototype.getPixelDomain = function (result) {
|
|
84
|
+
var plotArea = this._plotArea;
|
|
85
|
+
var padding = plotArea.padding;
|
|
86
|
+
var width = plotArea.width;
|
|
87
|
+
return result.set(padding.getLeft(), width - padding.getRight());
|
|
88
|
+
};
|
|
89
|
+
DChartPlotAreaTwofoldSubBase.prototype.getAxisBounds = function (position) {
|
|
90
|
+
return this.getPixelBounds();
|
|
91
|
+
};
|
|
92
|
+
DChartPlotAreaTwofoldSubBase.prototype.getSelectionBoundsX = function () {
|
|
93
|
+
return this.getPixelBounds();
|
|
94
|
+
};
|
|
95
|
+
DChartPlotAreaTwofoldSubBase.prototype.getSelectionBoundsY = function () {
|
|
96
|
+
return this.getPixelBounds();
|
|
97
|
+
};
|
|
98
|
+
DChartPlotAreaTwofoldSubBase.prototype.toBoundsDirty = function () {
|
|
99
|
+
this._isContainerBoundsDirty = true;
|
|
100
|
+
};
|
|
101
|
+
DChartPlotAreaTwofoldSubBase.prototype.destroy = function () {
|
|
102
|
+
this._container.destroy();
|
|
103
|
+
this._series.destroy();
|
|
104
|
+
this._axis.destroy();
|
|
105
|
+
};
|
|
106
|
+
return DChartPlotAreaTwofoldSubBase;
|
|
107
|
+
}());
|
|
108
|
+
export { DChartPlotAreaTwofoldSubBase };
|
|
109
|
+
//# sourceMappingURL=d-chart-plot-area-twofold-sub-base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-twofold-sub-base.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-sub-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAG5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAKpF,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAQ3C;IAeC,sCACC,QAA+C,EAC/C,iBAA6B,EAC7B,IAAa,EACb,MAAc,EACd,kBAAmC,EACnC,OAAgD;QAEhD,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;QACpC,IAAI,CAAC,gBAAgB,GAAG,IAAI,SAAS,EAAE,CAAC;QACxC,IAAI,CAAC,UAAU,GAAG,IAAI,KAAK,EAAE,CAAC;QAE9B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAEtB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAE1B,YAAY;QACZ,IAAM,SAAS,GAAG,IAAI,uBAAuB,CAAC,iBAAiB,CAAC,CAAC;QACjE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAE5B,aAAa;QACb,IAAI,CAAC,WAAW,GAAG,IAAI,6BAA6B,CAAC,IAAI,EAAE,OAAO,aAAP,OA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IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC5C,OAAO,IAAI,CAAC;IACb,CAAC;IAED,qDAAc,GAAd,UAAe,MAAoB;QAClC,IAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,IAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;QACjC,IAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;QAC7B,OAAO,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,KAAK,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAMD,oDAAa,GAAb,UAAc,QAA4B;QACzC,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,CAAC;IAED,0DAAmB,GAAnB;QACC,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,CAAC;IAED,0DAAmB,GAAnB;QACC,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,CAAC;IAED,oDAAa,GAAb;QACC,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;IACrC,CAAC;IAID,8CAAO,GAAP;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,mCAAC;AAAD,CAAC,AA1HD,IA0HC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DChartPlotArea } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { DBaseOverflowMaskSimple } from \"./d-base-overflow-mask-simple\";\nimport { DChartSeriesContainerImpl } from \"./d-chart-series-container-impl\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartAxisContainerImpl } from \"./d-chart-axis-container-impl\";\nimport { DChartCoordinateContainerImpl } from \"./d-chart-coordinate-container-impl\";\nimport {\n\tDChartPlotAreaTwofoldSub,\n\tDChartPlotAreaTwofoldSubOptions\n} from \"./d-chart-plot-area-twofold-sub\";\nimport { Point, Rectangle } from \"pixi.js\";\nimport { DChartRegion } from \"./d-chart-region\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\nimport { EShapeContainer } from \"./shape/e-shape-container\";\n\nexport interface DChartPlotAreaTwofoldSubParent<CHART extends DBase = DBase>\n\textends DChartPlotArea<CHART> {}\n\nexport abstract class DChartPlotAreaTwofoldSubBase<CHART extends DBase = DBase>\n\timplements DChartPlotAreaTwofoldSub<CHART>\n{\n\tprotected _isContainerBoundsDirty: boolean;\n\tprotected _containerBounds: Rectangle;\n\tprotected _workPoint: Point;\n\n\tprotected _plotArea: DChartPlotAreaTwofoldSubParent<CHART>;\n\tprotected _container: DChartPlotAreaContainer;\n\tprotected _series: DChartSeriesContainerImpl<CHART>;\n\tprotected _coordinate: DChartCoordinateContainer<CHART>;\n\tprotected _axis: DChartAxisContainerImpl<CHART>;\n\tprotected _overflowMask?: DBaseOverflowMaskSimple;\n\tprotected _margin: number;\n\n\tconstructor(\n\t\tplotArea: DChartPlotAreaTwofoldSubParent<CHART>,\n\t\tonContainerChange: () => void,\n\t\tmask: boolean,\n\t\tmargin: number,\n\t\taxisShapeContainer: EShapeContainer,\n\t\toptions?: DChartPlotAreaTwofoldSubOptions<CHART>\n\t) {\n\t\tthis._isContainerBoundsDirty = true;\n\t\tthis._containerBounds = new Rectangle();\n\t\tthis._workPoint = new Point();\n\n\t\tthis._margin = margin;\n\n\t\tthis._plotArea = plotArea;\n\n\t\t// Container\n\t\tconst container = new DChartPlotAreaContainer(onContainerChange);\n\t\tthis._container = container;\n\n\t\t// Coordinate\n\t\tthis._coordinate = new DChartCoordinateContainerImpl(this, options?.coordinate);\n\n\t\t// Overflow mask\n\t\tif (mask) {\n\t\t\tcontainer.mask = this.getOverflowMask();\n\t\t}\n\n\t\t// Series\n\t\tthis._series = new DChartSeriesContainerImpl(this, options?.series);\n\n\t\t// Axis\n\t\tthis._axis = new DChartAxisContainerImpl(this, axisShapeContainer, options?.axis);\n\t}\n\n\tprotected abstract getOverflowMask(): DBaseOverflowMaskSimple;\n\n\tget plotArea(): DChartPlotArea<CHART> {\n\t\treturn this._plotArea;\n\t}\n\n\tget chart(): CHART {\n\t\treturn this._plotArea.chart;\n\t}\n\n\tget container(): DChartPlotAreaContainer {\n\t\treturn this._container;\n\t}\n\n\tget series(): DChartSeriesContainerImpl<CHART> {\n\t\treturn this._series;\n\t}\n\n\tget coordinate(): DChartCoordinateContainer<CHART> {\n\t\treturn this._coordinate;\n\t}\n\n\tget axis(): DChartAxisContainer<CHART> {\n\t\treturn this._axis;\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\ton(name: string, callback: Function, context?: any): this {\n\t\tthis._plotArea.on(name, callback, context);\n\t\treturn this;\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\toff(name: string, callback?: Function, context?: any): this {\n\t\tthis._plotArea.off(name, callback, context);\n\t\treturn this;\n\t}\n\n\tgetPixelDomain(result: DChartRegion): DChartRegion {\n\t\tconst plotArea = this._plotArea;\n\t\tconst padding = plotArea.padding;\n\t\tconst width = plotArea.width;\n\t\treturn result.set(padding.getLeft(), width - padding.getRight());\n\t}\n\n\tabstract getPixelRange(result: DChartRegion): DChartRegion;\n\n\tabstract getPixelBounds(): Rectangle;\n\n\tgetAxisBounds(position: DChartAxisPosition): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsX(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsY(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\ttoBoundsDirty(): void {\n\t\tthis._isContainerBoundsDirty = true;\n\t}\n\n\tabstract getContainerBounds(): PIXI.Rectangle;\n\n\tdestroy(): void {\n\t\tthis._container.destroy();\n\t\tthis._series.destroy();\n\t\tthis._axis.destroy();\n\t}\n}\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { __extends } from "tslib";
|
|
6
|
+
import { DChartPlotAreaTwofoldOverflowMaskPrimary } from "./d-chart-plot-area-twofold-overflow-mask-primary";
|
|
7
|
+
import { DChartPlotAreaTwofoldSubBase } from "./d-chart-plot-area-twofold-sub-base";
|
|
8
|
+
var DChartPlotAreaTwofoldSubPrimary = /** @class */ (function (_super) {
|
|
9
|
+
__extends(DChartPlotAreaTwofoldSubPrimary, _super);
|
|
10
|
+
function DChartPlotAreaTwofoldSubPrimary() {
|
|
11
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
12
|
+
}
|
|
13
|
+
DChartPlotAreaTwofoldSubPrimary.prototype.getOverflowMask = function () {
|
|
14
|
+
if (this._overflowMask == null) {
|
|
15
|
+
var plotArea = this._plotArea;
|
|
16
|
+
this._overflowMask = new DChartPlotAreaTwofoldOverflowMaskPrimary(plotArea);
|
|
17
|
+
plotArea.reflowable.add(this._overflowMask);
|
|
18
|
+
plotArea.toDirty();
|
|
19
|
+
}
|
|
20
|
+
return this._overflowMask;
|
|
21
|
+
};
|
|
22
|
+
DChartPlotAreaTwofoldSubPrimary.prototype.getPixelRange = function (result) {
|
|
23
|
+
var plotArea = this._plotArea;
|
|
24
|
+
var padding = plotArea.padding;
|
|
25
|
+
var paddingTop = padding.getTop();
|
|
26
|
+
var height = plotArea.height;
|
|
27
|
+
return result.set((height - this._margin) * 0.5, paddingTop);
|
|
28
|
+
};
|
|
29
|
+
DChartPlotAreaTwofoldSubPrimary.prototype.getPixelBounds = function () {
|
|
30
|
+
var result = this._plotArea.getPixelBounds();
|
|
31
|
+
result.height *= 0.5;
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
DChartPlotAreaTwofoldSubPrimary.prototype.getContainerBounds = function () {
|
|
35
|
+
var result = this._containerBounds;
|
|
36
|
+
if (this._isContainerBoundsDirty) {
|
|
37
|
+
this._isContainerBoundsDirty = false;
|
|
38
|
+
var bounds = this._plotArea.getContainerBounds();
|
|
39
|
+
result.width = bounds.width;
|
|
40
|
+
result.height = bounds.height * 0.5;
|
|
41
|
+
result.x = bounds.x;
|
|
42
|
+
result.y = bounds.y;
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
};
|
|
46
|
+
return DChartPlotAreaTwofoldSubPrimary;
|
|
47
|
+
}(DChartPlotAreaTwofoldSubBase));
|
|
48
|
+
export { DChartPlotAreaTwofoldSubPrimary };
|
|
49
|
+
//# sourceMappingURL=d-chart-plot-area-twofold-sub-primary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-twofold-sub-primary.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAKH,OAAO,EAAE,wCAAwC,EAAE,MAAM,mDAAmD,CAAC;AAC7G,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAGpF;IAEU,mDAAmC;IAF7C;;IAuCA,CAAC;IApCmB,yDAAe,GAAlC;QACC,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE;YAC/B,IAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC;YAChC,IAAI,CAAC,aAAa,GAAG,IAAI,wCAAwC,CAAC,QAAQ,CAAC,CAAC;YAC5E,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC5C,QAAQ,CAAC,OAAO,EAAE,CAAC;SACnB;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;IAEQ,uDAAa,GAAtB,UAAuB,MAAoB;QAC1C,IAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,IAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;QACjC,IAAM,UAAU,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QACpC,IAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QAC/B,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,EAAE,UAAU,CAAC,CAAC;IAC9D,CAAC;IAEQ,wDAAc,GAAvB;QACC,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC;QAC/C,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC;QACrB,OAAO,MAAM,CAAC;IACf,CAAC;IAEQ,4DAAkB,GAA3B;QACC,IAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACrC,IAAI,IAAI,CAAC,uBAAuB,EAAE;YACjC,IAAI,CAAC,uBAAuB,GAAG,KAAK,CAAC;YACrC,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,kBAAkB,EAAE,CAAC;YACnD,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;YAC5B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC;YACpC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;SACpB;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IACF,sCAAC;AAAD,CAAC,AAvCD,CAEU,4BAA4B,GAqCrC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Rectangle } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DBaseOverflowMaskSimple } from \"./d-base-overflow-mask-simple\";\nimport { DChartPlotAreaTwofoldOverflowMaskPrimary } from \"./d-chart-plot-area-twofold-overflow-mask-primary\";\nimport { DChartPlotAreaTwofoldSubBase } from \"./d-chart-plot-area-twofold-sub-base\";\nimport { DChartRegion } from \"./d-chart-region\";\n\nexport class DChartPlotAreaTwofoldSubPrimary<\n\tCHART extends DBase = DBase\n> extends DChartPlotAreaTwofoldSubBase<CHART> {\n\tprotected override getOverflowMask(): DBaseOverflowMaskSimple {\n\t\tif (this._overflowMask == null) {\n\t\t\tconst plotArea = this._plotArea;\n\t\t\tthis._overflowMask = new DChartPlotAreaTwofoldOverflowMaskPrimary(plotArea);\n\t\t\tplotArea.reflowable.add(this._overflowMask);\n\t\t\tplotArea.toDirty();\n\t\t}\n\t\treturn this._overflowMask;\n\t}\n\n\toverride getPixelRange(result: DChartRegion): DChartRegion {\n\t\tconst plotArea = this._plotArea;\n\t\tconst padding = plotArea.padding;\n\t\tconst paddingTop = padding.getTop();\n\t\tconst height = plotArea.height;\n\t\treturn result.set((height - this._margin) * 0.5, paddingTop);\n\t}\n\n\toverride getPixelBounds(): Rectangle {\n\t\tconst result = this._plotArea.getPixelBounds();\n\t\tresult.height *= 0.5;\n\t\treturn result;\n\t}\n\n\toverride getContainerBounds(): PIXI.Rectangle {\n\t\tconst result = this._containerBounds;\n\t\tif (this._isContainerBoundsDirty) {\n\t\t\tthis._isContainerBoundsDirty = false;\n\t\t\tconst bounds = this._plotArea.getContainerBounds();\n\t\t\tresult.width = bounds.width;\n\t\t\tresult.height = bounds.height * 0.5;\n\t\t\tresult.x = bounds.x;\n\t\t\tresult.y = bounds.y;\n\t\t}\n\t\treturn result;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { __extends } from "tslib";
|
|
6
|
+
import { DChartPlotAreaTwofoldOverflowMaskSecondary } from "./d-chart-plot-area-twofold-overflow-mask-secondary";
|
|
7
|
+
import { DChartPlotAreaTwofoldSubBase } from "./d-chart-plot-area-twofold-sub-base";
|
|
8
|
+
var DChartPlotAreaTwofoldSubSecondary = /** @class */ (function (_super) {
|
|
9
|
+
__extends(DChartPlotAreaTwofoldSubSecondary, _super);
|
|
10
|
+
function DChartPlotAreaTwofoldSubSecondary() {
|
|
11
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
12
|
+
}
|
|
13
|
+
DChartPlotAreaTwofoldSubSecondary.prototype.getOverflowMask = function () {
|
|
14
|
+
if (this._overflowMask == null) {
|
|
15
|
+
var plotArea = this._plotArea;
|
|
16
|
+
this._overflowMask = new DChartPlotAreaTwofoldOverflowMaskSecondary(plotArea);
|
|
17
|
+
plotArea.reflowable.add(this._overflowMask);
|
|
18
|
+
plotArea.toDirty();
|
|
19
|
+
}
|
|
20
|
+
return this._overflowMask;
|
|
21
|
+
};
|
|
22
|
+
DChartPlotAreaTwofoldSubSecondary.prototype.getPixelRange = function (result) {
|
|
23
|
+
var plotArea = this._plotArea;
|
|
24
|
+
var padding = plotArea.padding;
|
|
25
|
+
var paddingBottom = padding.getBottom();
|
|
26
|
+
var height = plotArea.height;
|
|
27
|
+
return result.set(height - paddingBottom, (height + this._margin) * 0.5);
|
|
28
|
+
};
|
|
29
|
+
DChartPlotAreaTwofoldSubSecondary.prototype.getPixelBounds = function () {
|
|
30
|
+
var result = this._plotArea.getPixelBounds();
|
|
31
|
+
result.height *= 0.5;
|
|
32
|
+
result.y = result.height;
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
DChartPlotAreaTwofoldSubSecondary.prototype.getContainerBounds = function () {
|
|
36
|
+
var result = this._containerBounds;
|
|
37
|
+
if (this._isContainerBoundsDirty) {
|
|
38
|
+
this._isContainerBoundsDirty = false;
|
|
39
|
+
var bounds = this._plotArea.getContainerBounds();
|
|
40
|
+
result.width = bounds.width;
|
|
41
|
+
result.height = bounds.height * 0.5;
|
|
42
|
+
result.x = bounds.x;
|
|
43
|
+
result.y = bounds.y + result.height;
|
|
44
|
+
}
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
return DChartPlotAreaTwofoldSubSecondary;
|
|
48
|
+
}(DChartPlotAreaTwofoldSubBase));
|
|
49
|
+
export { DChartPlotAreaTwofoldSubSecondary };
|
|
50
|
+
//# sourceMappingURL=d-chart-plot-area-twofold-sub-secondary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-twofold-sub-secondary.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAKH,OAAO,EAAE,0CAA0C,EAAE,MAAM,qDAAqD,CAAC;AACjH,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAGpF;IAEU,qDAAmC;IAF7C;;IAwCA,CAAC;IArCU,2DAAe,GAAzB;QACC,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,EAAE;YAC/B,IAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC;YAChC,IAAI,CAAC,aAAa,GAAG,IAAI,0CAA0C,CAAC,QAAQ,CAAC,CAAC;YAC9E,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC5C,QAAQ,CAAC,OAAO,EAAE,CAAC;SACnB;QACD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;IAEQ,yDAAa,GAAtB,UAAuB,MAAoB;QAC1C,IAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,IAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;QACjC,IAAM,aAAa,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;QAC1C,IAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;QAC/B,OAAO,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,aAAa,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;IAC1E,CAAC;IAEQ,0DAAc,GAAvB;QACC,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC;QAC/C,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC;QACrB,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QACzB,OAAO,MAAM,CAAC;IACf,CAAC;IAEQ,8DAAkB,GAA3B;QACC,IAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACrC,IAAI,IAAI,CAAC,uBAAuB,EAAE;YACjC,IAAI,CAAC,uBAAuB,GAAG,KAAK,CAAC;YACrC,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,kBAAkB,EAAE,CAAC;YACnD,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;YAC5B,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC;YACpC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;SACpC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IACF,wCAAC;AAAD,CAAC,AAxCD,CAEU,4BAA4B,GAsCrC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Rectangle } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DBaseOverflowMaskSimple } from \"./d-base-overflow-mask-simple\";\nimport { DChartPlotAreaTwofoldOverflowMaskSecondary } from \"./d-chart-plot-area-twofold-overflow-mask-secondary\";\nimport { DChartPlotAreaTwofoldSubBase } from \"./d-chart-plot-area-twofold-sub-base\";\nimport { DChartRegion } from \"./d-chart-region\";\n\nexport class DChartPlotAreaTwofoldSubSecondary<\n\tCHART extends DBase = DBase\n> extends DChartPlotAreaTwofoldSubBase<CHART> {\n\tprotected getOverflowMask(): DBaseOverflowMaskSimple {\n\t\tif (this._overflowMask == null) {\n\t\t\tconst plotArea = this._plotArea;\n\t\t\tthis._overflowMask = new DChartPlotAreaTwofoldOverflowMaskSecondary(plotArea);\n\t\t\tplotArea.reflowable.add(this._overflowMask);\n\t\t\tplotArea.toDirty();\n\t\t}\n\t\treturn this._overflowMask;\n\t}\n\n\toverride getPixelRange(result: DChartRegion): DChartRegion {\n\t\tconst plotArea = this._plotArea;\n\t\tconst padding = plotArea.padding;\n\t\tconst paddingBottom = padding.getBottom();\n\t\tconst height = plotArea.height;\n\t\treturn result.set(height - paddingBottom, (height + this._margin) * 0.5);\n\t}\n\n\toverride getPixelBounds(): Rectangle {\n\t\tconst result = this._plotArea.getPixelBounds();\n\t\tresult.height *= 0.5;\n\t\tresult.y = result.height;\n\t\treturn result;\n\t}\n\n\toverride getContainerBounds(): PIXI.Rectangle {\n\t\tconst result = this._containerBounds;\n\t\tif (this._isContainerBoundsDirty) {\n\t\t\tthis._isContainerBoundsDirty = false;\n\t\t\tconst bounds = this._plotArea.getContainerBounds();\n\t\t\tresult.width = bounds.width;\n\t\t\tresult.height = bounds.height * 0.5;\n\t\t\tresult.x = bounds.x;\n\t\t\tresult.y = bounds.y + result.height;\n\t\t}\n\t\treturn result;\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-twofold-sub.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-sub.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DChartPlotArea, DChartPlotAreaLike } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { 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\";\n\nexport interface DChartPlotAreaTwofoldSubOptions<CHART extends DBase = DBase> {\n\tseries?: DChartSeriesContainerOptions<CHART>;\n\tcoordinate?: DChartCoordinateContainerOptions<CHART>;\n\taxis?: DChartAxisContainerOptions<CHART>;\n}\n\nexport interface DChartPlotAreaTwofoldSub<CHART extends DBase = DBase>\n\textends DChartPlotAreaLike<CHART> {\n\treadonly plotArea: DChartPlotArea<CHART>;\n\treadonly chart: CHART;\n\treadonly container: DChartPlotAreaContainer;\n\treadonly series: DChartSeriesContainerImpl<CHART>;\n\treadonly coordinate: DChartCoordinateContainer<CHART>;\n\treadonly axis: DChartAxisContainer<CHART>;\n\n\tgetContainerBounds(): PIXI.Rectangle;\n\tdestroy(): void;\n}\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var DChartPlotAreaTwofoldViewTargetPoint = /** @class */ (function () {
|
|
2
|
+
function DChartPlotAreaTwofoldViewTargetPoint(primary, secondary) {
|
|
3
|
+
this._primary = primary;
|
|
4
|
+
this._secondary = secondary;
|
|
5
|
+
}
|
|
6
|
+
Object.defineProperty(DChartPlotAreaTwofoldViewTargetPoint.prototype, "x", {
|
|
7
|
+
get: function () {
|
|
8
|
+
return this._secondary.x;
|
|
9
|
+
},
|
|
10
|
+
set: function (x) {
|
|
11
|
+
this._primary.x = x;
|
|
12
|
+
this._secondary.x = x;
|
|
13
|
+
},
|
|
14
|
+
enumerable: false,
|
|
15
|
+
configurable: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(DChartPlotAreaTwofoldViewTargetPoint.prototype, "y", {
|
|
18
|
+
get: function () {
|
|
19
|
+
return this._secondary.y;
|
|
20
|
+
},
|
|
21
|
+
set: function (y) {
|
|
22
|
+
this._primary.y = y;
|
|
23
|
+
this._secondary.y = y;
|
|
24
|
+
},
|
|
25
|
+
enumerable: false,
|
|
26
|
+
configurable: true
|
|
27
|
+
});
|
|
28
|
+
DChartPlotAreaTwofoldViewTargetPoint.prototype.set = function (x, y) {
|
|
29
|
+
this._primary.set(x, y);
|
|
30
|
+
this._secondary.set(x, y);
|
|
31
|
+
return this;
|
|
32
|
+
};
|
|
33
|
+
return DChartPlotAreaTwofoldViewTargetPoint;
|
|
34
|
+
}());
|
|
35
|
+
export { DChartPlotAreaTwofoldViewTargetPoint };
|
|
36
|
+
var DChartPlotAreaTwofoldViewTarget = /** @class */ (function () {
|
|
37
|
+
function DChartPlotAreaTwofoldViewTarget(primary, secondary) {
|
|
38
|
+
this._primary = primary;
|
|
39
|
+
this._secondary = secondary;
|
|
40
|
+
this._scale = new DChartPlotAreaTwofoldViewTargetPoint(primary.scale, secondary.scale);
|
|
41
|
+
this._position = new DChartPlotAreaTwofoldViewTargetPoint(primary.position, secondary.position);
|
|
42
|
+
}
|
|
43
|
+
Object.defineProperty(DChartPlotAreaTwofoldViewTarget.prototype, "scale", {
|
|
44
|
+
get: function () {
|
|
45
|
+
return this._scale;
|
|
46
|
+
},
|
|
47
|
+
enumerable: false,
|
|
48
|
+
configurable: true
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(DChartPlotAreaTwofoldViewTarget.prototype, "position", {
|
|
51
|
+
get: function () {
|
|
52
|
+
return this._position;
|
|
53
|
+
},
|
|
54
|
+
enumerable: false,
|
|
55
|
+
configurable: true
|
|
56
|
+
});
|
|
57
|
+
DChartPlotAreaTwofoldViewTarget.prototype.getLocalBounds = function (rect) {
|
|
58
|
+
this._primary.getLocalBounds(rect);
|
|
59
|
+
var x1 = rect.x;
|
|
60
|
+
var y1 = rect.y;
|
|
61
|
+
var w1 = rect.width;
|
|
62
|
+
var h1 = rect.height;
|
|
63
|
+
this._secondary.getLocalBounds(rect);
|
|
64
|
+
var x2 = rect.x;
|
|
65
|
+
var y2 = rect.y;
|
|
66
|
+
var w2 = rect.width;
|
|
67
|
+
var h2 = rect.height;
|
|
68
|
+
var x3 = Math.min(x1, x2);
|
|
69
|
+
var y3 = Math.min(y1, y2);
|
|
70
|
+
var x4 = Math.max(x1 + w1, x2 + w2);
|
|
71
|
+
var y4 = Math.max(y1 + h1, y2 + h2);
|
|
72
|
+
rect.x = x3;
|
|
73
|
+
rect.y = y3;
|
|
74
|
+
rect.width = x4 - x3;
|
|
75
|
+
rect.height = y4 - y3;
|
|
76
|
+
return rect;
|
|
77
|
+
};
|
|
78
|
+
return DChartPlotAreaTwofoldViewTarget;
|
|
79
|
+
}());
|
|
80
|
+
export { DChartPlotAreaTwofoldViewTarget };
|
|
81
|
+
//# sourceMappingURL=d-chart-plot-area-twofold-view-target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-twofold-view-target.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-view-target.ts"],"names":[],"mappings":"AAYA;IAIC,8CAAY,OAAe,EAAE,SAAiB;QAC7C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,sBAAI,mDAAC;aAAL;YACC,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAC1B,CAAC;aAED,UAAM,CAAS;YACd,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC;YACpB,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC;;;OALA;IAOD,sBAAI,mDAAC;aAAL;YACC,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAC1B,CAAC;aAED,UAAM,CAAS;YACd,IAAI,CAAC,QAAQ,CAA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M,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;QAClB,IAAM,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;QAClB,IAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACtB,IAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QACvB,IAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC5B,IAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC5B,IAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QACtC,IAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QACtC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;QACZ,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;QACZ,IAAI,CAAC,KAAK,GAAG,EAAE,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,EAAE,GAAG,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;IACF,sCAAC;AAAD,CAAC,AA7CD,IA6CC","sourcesContent":["import { IPoint, Rectangle } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DChartPlotAreaTwofoldSubPrimary } from \"./d-chart-plot-area-twofold-sub-primary\";\nimport { DChartPlotAreaTwofoldSubSecondary } from \"./d-chart-plot-area-twofold-sub-secondary\";\nimport { DViewTarget, DViewTargetPoint } from \"./d-view-to-target\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\n\nexport interface DChartPlotAreaTwofoldViewTargetParent<CHART extends DBase> {\n\treadonly primary: DChartPlotAreaTwofoldSubPrimary<CHART>;\n\treadonly secondary: DChartPlotAreaTwofoldSubSecondary<CHART>;\n}\n\nexport class DChartPlotAreaTwofoldViewTargetPoint {\n\tprotected _primary: IPoint;\n\tprotected _secondary: IPoint;\n\n\tconstructor(primary: IPoint, secondary: IPoint) {\n\t\tthis._primary = primary;\n\t\tthis._secondary = secondary;\n\t}\n\n\tget x(): number {\n\t\treturn this._secondary.x;\n\t}\n\n\tset x(x: number) {\n\t\tthis._primary.x = x;\n\t\tthis._secondary.x = x;\n\t}\n\n\tget y(): number {\n\t\treturn this._secondary.y;\n\t}\n\n\tset y(y: number) {\n\t\tthis._primary.y = y;\n\t\tthis._secondary.y = y;\n\t}\n\n\tset(x?: number, y?: number): this {\n\t\tthis._primary.set(x, y);\n\t\tthis._secondary.set(x, y);\n\t\treturn this;\n\t}\n}\n\nexport class DChartPlotAreaTwofoldViewTarget<CHART extends DBase> implements DViewTarget {\n\tprotected _primary: DChartPlotAreaContainer;\n\tprotected _secondary: DChartPlotAreaContainer;\n\tprotected _scale: DChartPlotAreaTwofoldViewTargetPoint;\n\tprotected _position: DChartPlotAreaTwofoldViewTargetPoint;\n\n\tconstructor(primary: DChartPlotAreaContainer, secondary: DChartPlotAreaContainer) {\n\t\tthis._primary = primary;\n\t\tthis._secondary = secondary;\n\t\tthis._scale = new DChartPlotAreaTwofoldViewTargetPoint(primary.scale, secondary.scale);\n\t\tthis._position = new DChartPlotAreaTwofoldViewTargetPoint(\n\t\t\tprimary.position,\n\t\t\tsecondary.position\n\t\t);\n\t}\n\n\tget scale(): DViewTargetPoint {\n\t\treturn this._scale;\n\t}\n\n\tget position(): DViewTargetPoint {\n\t\treturn this._position;\n\t}\n\n\tgetLocalBounds(rect: Rectangle): Rectangle {\n\t\tthis._primary.getLocalBounds(rect);\n\t\tconst x1 = rect.x;\n\t\tconst y1 = rect.y;\n\t\tconst w1 = rect.width;\n\t\tconst h1 = rect.height;\n\t\tthis._secondary.getLocalBounds(rect);\n\t\tconst x2 = rect.x;\n\t\tconst y2 = rect.y;\n\t\tconst w2 = rect.width;\n\t\tconst h2 = rect.height;\n\t\tconst x3 = Math.min(x1, x2);\n\t\tconst y3 = Math.min(y1, y2);\n\t\tconst x4 = Math.max(x1 + w1, x2 + w2);\n\t\tconst y4 = Math.max(y1 + h1, y2 + h2);\n\t\trect.x = x3;\n\t\trect.y = y3;\n\t\trect.width = x4 - x3;\n\t\trect.height = y4 - y3;\n\t\treturn rect;\n\t}\n}\n"]}
|