@wcardinal/wcardinal-ui 0.369.0 → 0.371.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-application-layer-options.d.ts +26 -0
- package/dist/wcardinal/ui/d-application-layer-options.js +36 -0
- package/dist/wcardinal/ui/d-application-layer-options.js.map +1 -1
- package/dist/wcardinal/ui/d-application-layer.js +20 -9
- package/dist/wcardinal/ui/d-application-layer.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +2 -2
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +59 -12
- package/dist/wcardinal-ui.js +59 -12
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.371.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -48545,6 +48545,8 @@
|
|
|
48545
48545
|
width = bbox.width;
|
|
48546
48546
|
height = bbox.height;
|
|
48547
48547
|
}
|
|
48548
|
+
this._isWidthFixed = options.width != null;
|
|
48549
|
+
this._isHeightFixed = options.height != null;
|
|
48548
48550
|
// Background color
|
|
48549
48551
|
var background = options === null || options === void 0 ? void 0 : options.background;
|
|
48550
48552
|
var backgroundColor = 0;
|
|
@@ -48613,6 +48615,23 @@
|
|
|
48613
48615
|
this._pixi.width = width;
|
|
48614
48616
|
return this;
|
|
48615
48617
|
};
|
|
48618
|
+
/**
|
|
48619
|
+
* Returns true if the width is fixed.
|
|
48620
|
+
*
|
|
48621
|
+
* @returns true if the width is fixed.
|
|
48622
|
+
*/
|
|
48623
|
+
DApplicationLayerOptions.prototype.isWidthFixed = function () {
|
|
48624
|
+
return this._isWidthFixed;
|
|
48625
|
+
};
|
|
48626
|
+
/**
|
|
48627
|
+
* Makes the canvas width fixed.
|
|
48628
|
+
*
|
|
48629
|
+
* @param fixed true to make the canvas width fixed
|
|
48630
|
+
*/
|
|
48631
|
+
DApplicationLayerOptions.prototype.setWidthFixed = function (fixed) {
|
|
48632
|
+
this._isWidthFixed = fixed;
|
|
48633
|
+
return this;
|
|
48634
|
+
};
|
|
48616
48635
|
/**
|
|
48617
48636
|
* Returns a canvas height.
|
|
48618
48637
|
*/
|
|
@@ -48628,6 +48647,23 @@
|
|
|
48628
48647
|
this._pixi.height = height;
|
|
48629
48648
|
return this;
|
|
48630
48649
|
};
|
|
48650
|
+
/**
|
|
48651
|
+
* Returns true if the height is fixed.
|
|
48652
|
+
*
|
|
48653
|
+
* @returns true if the height is fixed.
|
|
48654
|
+
*/
|
|
48655
|
+
DApplicationLayerOptions.prototype.isHeightFixed = function () {
|
|
48656
|
+
return this._isHeightFixed;
|
|
48657
|
+
};
|
|
48658
|
+
/**
|
|
48659
|
+
* Makes the canvas height fixed.
|
|
48660
|
+
*
|
|
48661
|
+
* @param fixed true to make the canvas height fixed
|
|
48662
|
+
*/
|
|
48663
|
+
DApplicationLayerOptions.prototype.setHeightFixed = function (fixed) {
|
|
48664
|
+
this._isHeightFixed = fixed;
|
|
48665
|
+
return this;
|
|
48666
|
+
};
|
|
48631
48667
|
/**
|
|
48632
48668
|
* Returns padding sizes.
|
|
48633
48669
|
* The default padding size is 6.
|
|
@@ -49149,23 +49185,34 @@
|
|
|
49149
49185
|
};
|
|
49150
49186
|
DApplicationLayer.prototype.initResizeHandling = function () {
|
|
49151
49187
|
var _this = this;
|
|
49152
|
-
var
|
|
49153
|
-
|
|
49154
|
-
|
|
49155
|
-
|
|
49156
|
-
|
|
49188
|
+
var options = this._options;
|
|
49189
|
+
var isWidthFixed = options.isWidthFixed();
|
|
49190
|
+
var isHeightFixed = options.isHeightFixed();
|
|
49191
|
+
if (!isWidthFixed || !isHeightFixed) {
|
|
49192
|
+
var onResizeBound = function () {
|
|
49193
|
+
_this.onResize();
|
|
49194
|
+
};
|
|
49195
|
+
if (window.ResizeObserver != null) {
|
|
49196
|
+
new ResizeObserver(onResizeBound).observe(this._rootElement);
|
|
49197
|
+
}
|
|
49198
|
+
else {
|
|
49199
|
+
window.addEventListener("resize", onResizeBound);
|
|
49200
|
+
window.addEventListener("orientationchange", onResizeBound);
|
|
49201
|
+
}
|
|
49202
|
+
}
|
|
49157
49203
|
};
|
|
49158
49204
|
DApplicationLayer.prototype.onResize = function () {
|
|
49205
|
+
var options = this._options;
|
|
49159
49206
|
var bbox = this._rootElement.getBoundingClientRect();
|
|
49160
|
-
var
|
|
49161
|
-
var
|
|
49162
|
-
this.renderer.resize(
|
|
49207
|
+
var newWidth = options.isWidthFixed() ? options.getWidth() : bbox.width;
|
|
49208
|
+
var newHeight = options.isHeightFixed() ? options.getHeight() : bbox.height;
|
|
49209
|
+
this.renderer.resize(newWidth, newHeight);
|
|
49163
49210
|
var padding = this._padding;
|
|
49164
49211
|
var children = this.stage.children;
|
|
49165
49212
|
for (var i = 0, imax = children.length; i < imax; ++i) {
|
|
49166
49213
|
var child = children[i];
|
|
49167
49214
|
if (child instanceof DBase) {
|
|
49168
|
-
child.onParentResize(
|
|
49215
|
+
child.onParentResize(newWidth, newHeight, padding);
|
|
49169
49216
|
}
|
|
49170
49217
|
}
|
|
49171
49218
|
this.update();
|
|
@@ -57146,14 +57193,14 @@
|
|
|
57146
57193
|
this._container = undefined;
|
|
57147
57194
|
};
|
|
57148
57195
|
DChartAxisBaseTickContainer.prototype.update = function () {
|
|
57196
|
+
var parser = this._parser;
|
|
57149
57197
|
var container = this._container;
|
|
57150
57198
|
var majorShapes = this._major.shapes;
|
|
57151
57199
|
var minorShapes = this._minor.shapes;
|
|
57152
|
-
if (container != null && majorShapes && minorShapes) {
|
|
57200
|
+
if (parser.tick.enable && container != null && majorShapes && minorShapes) {
|
|
57153
57201
|
var plotArea = container.plotArea;
|
|
57154
57202
|
var transform = plotArea.container.transform.localTransform;
|
|
57155
57203
|
var gridlineShapes = this._major.gridline.shapes;
|
|
57156
|
-
var parser = this._parser;
|
|
57157
57204
|
var offset = parser.padding * this._index;
|
|
57158
57205
|
var work = this._work;
|
|
57159
57206
|
var coordinate = void 0;
|