leafer-ui 1.3.1 → 1.3.3
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/README.md +14 -4
- package/dist/web.cjs +13 -10
- package/dist/web.esm.js +13 -10
- package/dist/web.esm.min.js +1 -1
- package/dist/web.js +207 -189
- package/dist/web.min.cjs +1 -1
- package/dist/web.min.js +1 -1
- package/dist/web.module.js +286 -268
- package/dist/web.module.min.js +1 -1
- package/package.json +12 -12
package/dist/web.module.js
CHANGED
|
@@ -1533,10 +1533,10 @@ const DataHelper = {
|
|
|
1533
1533
|
Object.keys(merge).forEach(key => {
|
|
1534
1534
|
var _a, _b;
|
|
1535
1535
|
value = merge[key];
|
|
1536
|
-
if ((value === null || value ===
|
|
1536
|
+
if ((value === null || value === undefined ? undefined : value.constructor) === Object && ((_a = t[key]) === null || _a === undefined ? undefined : _a.constructor) === Object)
|
|
1537
1537
|
return assign(t[key], merge[key], exclude && exclude[key]);
|
|
1538
1538
|
if (exclude && (key in exclude)) {
|
|
1539
|
-
if (((_b = exclude[key]) === null || _b ===
|
|
1539
|
+
if (((_b = exclude[key]) === null || _b === undefined ? undefined : _b.constructor) === Object)
|
|
1540
1540
|
assign(t[key] = {}, merge[key], exclude[key]);
|
|
1541
1541
|
return;
|
|
1542
1542
|
}
|
|
@@ -1705,7 +1705,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
1705
1705
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1706
1706
|
PERFORMANCE OF THIS SOFTWARE.
|
|
1707
1707
|
***************************************************************************** */
|
|
1708
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
1708
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
1709
1709
|
|
|
1710
1710
|
|
|
1711
1711
|
function __decorate(decorators, target, key, desc) {
|
|
@@ -1773,7 +1773,7 @@ let Canvas$1 = class Canvas {
|
|
|
1773
1773
|
}
|
|
1774
1774
|
setTransform(_a, _b, _c, _d, _e, _f) { }
|
|
1775
1775
|
resetTransform() { }
|
|
1776
|
-
getTransform() { return
|
|
1776
|
+
getTransform() { return undefined; }
|
|
1777
1777
|
save() { }
|
|
1778
1778
|
restore() { }
|
|
1779
1779
|
transform(a, b, c, d, e, f) {
|
|
@@ -1830,12 +1830,12 @@ let Canvas$1 = class Canvas {
|
|
|
1830
1830
|
ellipse(_x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise) { }
|
|
1831
1831
|
rect(_x, _y, _width, _height) { }
|
|
1832
1832
|
roundRect(_x, _y, _width, _height, _radius) { }
|
|
1833
|
-
createConicGradient(_startAngle, _x, _y) { return
|
|
1834
|
-
createLinearGradient(_x0, _y0, _x1, _y1) { return
|
|
1835
|
-
createPattern(_image, _repetition) { return
|
|
1836
|
-
createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return
|
|
1833
|
+
createConicGradient(_startAngle, _x, _y) { return undefined; }
|
|
1834
|
+
createLinearGradient(_x0, _y0, _x1, _y1) { return undefined; }
|
|
1835
|
+
createPattern(_image, _repetition) { return undefined; }
|
|
1836
|
+
createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return undefined; }
|
|
1837
1837
|
fillText(_text, _x, _y, _maxWidth) { }
|
|
1838
|
-
measureText(_text) { return
|
|
1838
|
+
measureText(_text) { return undefined; }
|
|
1839
1839
|
strokeText(_text, _x, _y, _maxWidth) { }
|
|
1840
1840
|
destroy() {
|
|
1841
1841
|
this.context = null;
|
|
@@ -1843,79 +1843,79 @@ let Canvas$1 = class Canvas {
|
|
|
1843
1843
|
};
|
|
1844
1844
|
__decorate([
|
|
1845
1845
|
contextAttr('imageSmoothingEnabled')
|
|
1846
|
-
], Canvas$1.prototype, "smooth",
|
|
1846
|
+
], Canvas$1.prototype, "smooth", undefined);
|
|
1847
1847
|
__decorate([
|
|
1848
1848
|
contextAttr('imageSmoothingQuality')
|
|
1849
|
-
], Canvas$1.prototype, "smoothLevel",
|
|
1849
|
+
], Canvas$1.prototype, "smoothLevel", undefined);
|
|
1850
1850
|
__decorate([
|
|
1851
1851
|
contextAttr('globalAlpha')
|
|
1852
|
-
], Canvas$1.prototype, "opacity",
|
|
1852
|
+
], Canvas$1.prototype, "opacity", undefined);
|
|
1853
1853
|
__decorate([
|
|
1854
1854
|
contextAttr()
|
|
1855
|
-
], Canvas$1.prototype, "fillStyle",
|
|
1855
|
+
], Canvas$1.prototype, "fillStyle", undefined);
|
|
1856
1856
|
__decorate([
|
|
1857
1857
|
contextAttr()
|
|
1858
|
-
], Canvas$1.prototype, "strokeStyle",
|
|
1858
|
+
], Canvas$1.prototype, "strokeStyle", undefined);
|
|
1859
1859
|
__decorate([
|
|
1860
1860
|
contextAttr('lineWidth')
|
|
1861
|
-
], Canvas$1.prototype, "strokeWidth",
|
|
1861
|
+
], Canvas$1.prototype, "strokeWidth", undefined);
|
|
1862
1862
|
__decorate([
|
|
1863
1863
|
contextAttr('lineCap')
|
|
1864
|
-
], Canvas$1.prototype, "strokeCap",
|
|
1864
|
+
], Canvas$1.prototype, "strokeCap", undefined);
|
|
1865
1865
|
__decorate([
|
|
1866
1866
|
contextAttr('lineJoin')
|
|
1867
|
-
], Canvas$1.prototype, "strokeJoin",
|
|
1867
|
+
], Canvas$1.prototype, "strokeJoin", undefined);
|
|
1868
1868
|
__decorate([
|
|
1869
1869
|
contextAttr('lineDashOffset')
|
|
1870
|
-
], Canvas$1.prototype, "dashOffset",
|
|
1870
|
+
], Canvas$1.prototype, "dashOffset", undefined);
|
|
1871
1871
|
__decorate([
|
|
1872
1872
|
contextAttr()
|
|
1873
|
-
], Canvas$1.prototype, "miterLimit",
|
|
1873
|
+
], Canvas$1.prototype, "miterLimit", undefined);
|
|
1874
1874
|
__decorate([
|
|
1875
1875
|
contextAttr()
|
|
1876
|
-
], Canvas$1.prototype, "shadowBlur",
|
|
1876
|
+
], Canvas$1.prototype, "shadowBlur", undefined);
|
|
1877
1877
|
__decorate([
|
|
1878
1878
|
contextAttr()
|
|
1879
|
-
], Canvas$1.prototype, "shadowColor",
|
|
1879
|
+
], Canvas$1.prototype, "shadowColor", undefined);
|
|
1880
1880
|
__decorate([
|
|
1881
1881
|
contextAttr()
|
|
1882
|
-
], Canvas$1.prototype, "shadowOffsetX",
|
|
1882
|
+
], Canvas$1.prototype, "shadowOffsetX", undefined);
|
|
1883
1883
|
__decorate([
|
|
1884
1884
|
contextAttr()
|
|
1885
|
-
], Canvas$1.prototype, "shadowOffsetY",
|
|
1885
|
+
], Canvas$1.prototype, "shadowOffsetY", undefined);
|
|
1886
1886
|
__decorate([
|
|
1887
1887
|
contextAttr()
|
|
1888
|
-
], Canvas$1.prototype, "filter",
|
|
1888
|
+
], Canvas$1.prototype, "filter", undefined);
|
|
1889
1889
|
__decorate([
|
|
1890
1890
|
contextAttr()
|
|
1891
|
-
], Canvas$1.prototype, "font",
|
|
1891
|
+
], Canvas$1.prototype, "font", undefined);
|
|
1892
1892
|
__decorate([
|
|
1893
1893
|
contextAttr()
|
|
1894
|
-
], Canvas$1.prototype, "fontKerning",
|
|
1894
|
+
], Canvas$1.prototype, "fontKerning", undefined);
|
|
1895
1895
|
__decorate([
|
|
1896
1896
|
contextAttr()
|
|
1897
|
-
], Canvas$1.prototype, "fontStretch",
|
|
1897
|
+
], Canvas$1.prototype, "fontStretch", undefined);
|
|
1898
1898
|
__decorate([
|
|
1899
1899
|
contextAttr()
|
|
1900
|
-
], Canvas$1.prototype, "fontVariantCaps",
|
|
1900
|
+
], Canvas$1.prototype, "fontVariantCaps", undefined);
|
|
1901
1901
|
__decorate([
|
|
1902
1902
|
contextAttr()
|
|
1903
|
-
], Canvas$1.prototype, "textAlign",
|
|
1903
|
+
], Canvas$1.prototype, "textAlign", undefined);
|
|
1904
1904
|
__decorate([
|
|
1905
1905
|
contextAttr()
|
|
1906
|
-
], Canvas$1.prototype, "textBaseline",
|
|
1906
|
+
], Canvas$1.prototype, "textBaseline", undefined);
|
|
1907
1907
|
__decorate([
|
|
1908
1908
|
contextAttr()
|
|
1909
|
-
], Canvas$1.prototype, "textRendering",
|
|
1909
|
+
], Canvas$1.prototype, "textRendering", undefined);
|
|
1910
1910
|
__decorate([
|
|
1911
1911
|
contextAttr()
|
|
1912
|
-
], Canvas$1.prototype, "wordSpacing",
|
|
1912
|
+
], Canvas$1.prototype, "wordSpacing", undefined);
|
|
1913
1913
|
__decorate([
|
|
1914
1914
|
contextAttr()
|
|
1915
|
-
], Canvas$1.prototype, "letterSpacing",
|
|
1915
|
+
], Canvas$1.prototype, "letterSpacing", undefined);
|
|
1916
1916
|
__decorate([
|
|
1917
1917
|
contextAttr()
|
|
1918
|
-
], Canvas$1.prototype, "direction",
|
|
1918
|
+
], Canvas$1.prototype, "direction", undefined);
|
|
1919
1919
|
__decorate([
|
|
1920
1920
|
contextMethod()
|
|
1921
1921
|
], Canvas$1.prototype, "setTransform", null);
|
|
@@ -3384,7 +3384,7 @@ class TaskItem {
|
|
|
3384
3384
|
this.task = task;
|
|
3385
3385
|
}
|
|
3386
3386
|
run() {
|
|
3387
|
-
return __awaiter(this,
|
|
3387
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
3388
3388
|
try {
|
|
3389
3389
|
if (this.task && !this.isComplete && this.parent.running)
|
|
3390
3390
|
yield this.task();
|
|
@@ -3696,7 +3696,7 @@ class LeaferImage {
|
|
|
3696
3696
|
load(onSuccess, onError) {
|
|
3697
3697
|
if (!this.loading) {
|
|
3698
3698
|
this.loading = true;
|
|
3699
|
-
ImageManager.tasker.add(() => __awaiter(this,
|
|
3699
|
+
ImageManager.tasker.add(() => __awaiter(this, undefined, undefined, function* () {
|
|
3700
3700
|
return yield Platform.origin.loadImage(this.url).then((img) => {
|
|
3701
3701
|
this.ready = true;
|
|
3702
3702
|
this.width = img.naturalWidth || img.width;
|
|
@@ -5175,8 +5175,7 @@ const LeafBounds = {
|
|
|
5175
5175
|
__updateAutoLayout() {
|
|
5176
5176
|
this.__layout.matrixChanged = true;
|
|
5177
5177
|
if (this.isBranch) {
|
|
5178
|
-
|
|
5179
|
-
this.leafer.layouter.addExtra(this);
|
|
5178
|
+
this.__extraUpdate();
|
|
5180
5179
|
if (this.__.flow) {
|
|
5181
5180
|
if (this.__layout.boxChanged)
|
|
5182
5181
|
this.__updateFlowLayout();
|
|
@@ -5329,7 +5328,7 @@ let Leaf = class Leaf {
|
|
|
5329
5328
|
get __worldFlipped() { return this.__world.scaleX < 0 || this.__world.scaleY < 0; }
|
|
5330
5329
|
get __onlyHitMask() { return this.__hasMask && !this.__.hitChildren; }
|
|
5331
5330
|
get __ignoreHitWorld() { return (this.__hasMask || this.__hasEraser) && this.__.hitChildren; }
|
|
5332
|
-
get __inLazyBounds() {
|
|
5331
|
+
get __inLazyBounds() { return this.leaferIsCreated && this.leafer.lazyBounds.hit(this.__world); }
|
|
5333
5332
|
get pathInputed() { return this.__.__pathInputed; }
|
|
5334
5333
|
set event(map) { this.on(map); }
|
|
5335
5334
|
constructor(data) {
|
|
@@ -5440,6 +5439,10 @@ let Leaf = class Leaf {
|
|
|
5440
5439
|
forceRender(_bounds, _sync) {
|
|
5441
5440
|
this.forceUpdate('surface');
|
|
5442
5441
|
}
|
|
5442
|
+
__extraUpdate() {
|
|
5443
|
+
if (this.leaferIsReady)
|
|
5444
|
+
this.leafer.layouter.addExtra(this);
|
|
5445
|
+
}
|
|
5443
5446
|
__updateWorldMatrix() { }
|
|
5444
5447
|
__updateLocalMatrix() { }
|
|
5445
5448
|
__updateWorldBounds() { }
|
|
@@ -6007,7 +6010,7 @@ class LeafLevelList {
|
|
|
6007
6010
|
}
|
|
6008
6011
|
}
|
|
6009
6012
|
|
|
6010
|
-
const version = "1.3.
|
|
6013
|
+
const version = "1.3.3";
|
|
6011
6014
|
|
|
6012
6015
|
const debug$5 = Debug.get('LeaferCanvas');
|
|
6013
6016
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
@@ -6226,7 +6229,7 @@ function useCanvas(_canvasType, _power) {
|
|
|
6226
6229
|
},
|
|
6227
6230
|
loadImage(src) {
|
|
6228
6231
|
return new Promise((resolve, reject) => {
|
|
6229
|
-
const img = new Image();
|
|
6232
|
+
const img = new Platform.origin.Image();
|
|
6230
6233
|
const { crossOrigin } = Platform.image;
|
|
6231
6234
|
if (crossOrigin) {
|
|
6232
6235
|
img.setAttribute('crossOrigin', crossOrigin);
|
|
@@ -6236,7 +6239,10 @@ function useCanvas(_canvasType, _power) {
|
|
|
6236
6239
|
img.onerror = (e) => { reject(e); };
|
|
6237
6240
|
img.src = Platform.image.getRealURL(src);
|
|
6238
6241
|
});
|
|
6239
|
-
}
|
|
6242
|
+
},
|
|
6243
|
+
Image,
|
|
6244
|
+
PointerEvent,
|
|
6245
|
+
DragEvent
|
|
6240
6246
|
};
|
|
6241
6247
|
Platform.event = {
|
|
6242
6248
|
stopDefault(origin) { origin.preventDefault(); },
|
|
@@ -6525,7 +6531,7 @@ class Layouter {
|
|
|
6525
6531
|
}
|
|
6526
6532
|
partLayout() {
|
|
6527
6533
|
var _a;
|
|
6528
|
-
if (!((_a = this.__updatedList) === null || _a ===
|
|
6534
|
+
if (!((_a = this.__updatedList) === null || _a === undefined ? undefined : _a.length))
|
|
6529
6535
|
return;
|
|
6530
6536
|
const t = Run.start('PartLayout');
|
|
6531
6537
|
const { target, __updatedList: updateList } = this;
|
|
@@ -6712,7 +6718,7 @@ class Renderer {
|
|
|
6712
6718
|
partRender() {
|
|
6713
6719
|
const { canvas, updateBlocks: list } = this;
|
|
6714
6720
|
if (!list)
|
|
6715
|
-
return
|
|
6721
|
+
return;
|
|
6716
6722
|
this.mergeBlocks();
|
|
6717
6723
|
list.forEach(block => { if (canvas.bounds.hit(block) && !block.isEmpty())
|
|
6718
6724
|
this.clipRender(block); });
|
|
@@ -7096,6 +7102,7 @@ class UIData extends LeafData {
|
|
|
7096
7102
|
return t.fill && this.__hasStroke;
|
|
7097
7103
|
}
|
|
7098
7104
|
get __clipAfterFill() { const t = this; return (t.cornerRadius || t.innerShadow || t.__pathInputed); }
|
|
7105
|
+
get __hasSurface() { const t = this; return (t.fill || t.stroke); }
|
|
7099
7106
|
get __autoWidth() { return !this._width; }
|
|
7100
7107
|
get __autoHeight() { return !this._height; }
|
|
7101
7108
|
get __autoSide() { return !this._width || !this._height; }
|
|
@@ -7568,7 +7575,7 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
7568
7575
|
animate(_keyframe, _options, _type, _isTemp) {
|
|
7569
7576
|
return Plugin.need('animate');
|
|
7570
7577
|
}
|
|
7571
|
-
killAnimate(_type,
|
|
7578
|
+
killAnimate(_type, _nextStyle) { }
|
|
7572
7579
|
export(_filename, _options) {
|
|
7573
7580
|
return Plugin.need('export');
|
|
7574
7581
|
}
|
|
@@ -7599,199 +7606,199 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
7599
7606
|
};
|
|
7600
7607
|
__decorate([
|
|
7601
7608
|
dataProcessor(UIData)
|
|
7602
|
-
], UI.prototype, "__",
|
|
7609
|
+
], UI.prototype, "__", undefined);
|
|
7603
7610
|
__decorate([
|
|
7604
7611
|
zoomLayerType()
|
|
7605
|
-
], UI.prototype, "zoomLayer",
|
|
7612
|
+
], UI.prototype, "zoomLayer", undefined);
|
|
7606
7613
|
__decorate([
|
|
7607
7614
|
dataType('')
|
|
7608
|
-
], UI.prototype, "id",
|
|
7615
|
+
], UI.prototype, "id", undefined);
|
|
7609
7616
|
__decorate([
|
|
7610
7617
|
dataType('')
|
|
7611
|
-
], UI.prototype, "name",
|
|
7618
|
+
], UI.prototype, "name", undefined);
|
|
7612
7619
|
__decorate([
|
|
7613
7620
|
dataType('')
|
|
7614
|
-
], UI.prototype, "className",
|
|
7621
|
+
], UI.prototype, "className", undefined);
|
|
7615
7622
|
__decorate([
|
|
7616
7623
|
surfaceType('pass-through')
|
|
7617
|
-
], UI.prototype, "blendMode",
|
|
7624
|
+
], UI.prototype, "blendMode", undefined);
|
|
7618
7625
|
__decorate([
|
|
7619
7626
|
opacityType(1)
|
|
7620
|
-
], UI.prototype, "opacity",
|
|
7627
|
+
], UI.prototype, "opacity", undefined);
|
|
7621
7628
|
__decorate([
|
|
7622
7629
|
visibleType(true)
|
|
7623
|
-
], UI.prototype, "visible",
|
|
7630
|
+
], UI.prototype, "visible", undefined);
|
|
7624
7631
|
__decorate([
|
|
7625
7632
|
surfaceType(false)
|
|
7626
|
-
], UI.prototype, "locked",
|
|
7633
|
+
], UI.prototype, "locked", undefined);
|
|
7627
7634
|
__decorate([
|
|
7628
7635
|
sortType(0)
|
|
7629
|
-
], UI.prototype, "zIndex",
|
|
7636
|
+
], UI.prototype, "zIndex", undefined);
|
|
7630
7637
|
__decorate([
|
|
7631
7638
|
maskType(false)
|
|
7632
|
-
], UI.prototype, "mask",
|
|
7639
|
+
], UI.prototype, "mask", undefined);
|
|
7633
7640
|
__decorate([
|
|
7634
7641
|
eraserType(false)
|
|
7635
|
-
], UI.prototype, "eraser",
|
|
7642
|
+
], UI.prototype, "eraser", undefined);
|
|
7636
7643
|
__decorate([
|
|
7637
7644
|
positionType(0, true)
|
|
7638
|
-
], UI.prototype, "x",
|
|
7645
|
+
], UI.prototype, "x", undefined);
|
|
7639
7646
|
__decorate([
|
|
7640
7647
|
positionType(0, true)
|
|
7641
|
-
], UI.prototype, "y",
|
|
7648
|
+
], UI.prototype, "y", undefined);
|
|
7642
7649
|
__decorate([
|
|
7643
7650
|
boundsType(100, true)
|
|
7644
|
-
], UI.prototype, "width",
|
|
7651
|
+
], UI.prototype, "width", undefined);
|
|
7645
7652
|
__decorate([
|
|
7646
7653
|
boundsType(100, true)
|
|
7647
|
-
], UI.prototype, "height",
|
|
7654
|
+
], UI.prototype, "height", undefined);
|
|
7648
7655
|
__decorate([
|
|
7649
7656
|
scaleType(1, true)
|
|
7650
|
-
], UI.prototype, "scaleX",
|
|
7657
|
+
], UI.prototype, "scaleX", undefined);
|
|
7651
7658
|
__decorate([
|
|
7652
7659
|
scaleType(1, true)
|
|
7653
|
-
], UI.prototype, "scaleY",
|
|
7660
|
+
], UI.prototype, "scaleY", undefined);
|
|
7654
7661
|
__decorate([
|
|
7655
7662
|
rotationType(0, true)
|
|
7656
|
-
], UI.prototype, "rotation",
|
|
7663
|
+
], UI.prototype, "rotation", undefined);
|
|
7657
7664
|
__decorate([
|
|
7658
7665
|
rotationType(0, true)
|
|
7659
|
-
], UI.prototype, "skewX",
|
|
7666
|
+
], UI.prototype, "skewX", undefined);
|
|
7660
7667
|
__decorate([
|
|
7661
7668
|
rotationType(0, true)
|
|
7662
|
-
], UI.prototype, "skewY",
|
|
7669
|
+
], UI.prototype, "skewY", undefined);
|
|
7663
7670
|
__decorate([
|
|
7664
7671
|
positionType(0, true)
|
|
7665
|
-
], UI.prototype, "offsetX",
|
|
7672
|
+
], UI.prototype, "offsetX", undefined);
|
|
7666
7673
|
__decorate([
|
|
7667
7674
|
positionType(0, true)
|
|
7668
|
-
], UI.prototype, "offsetY",
|
|
7675
|
+
], UI.prototype, "offsetY", undefined);
|
|
7669
7676
|
__decorate([
|
|
7670
7677
|
positionType(0, true)
|
|
7671
|
-
], UI.prototype, "scrollX",
|
|
7678
|
+
], UI.prototype, "scrollX", undefined);
|
|
7672
7679
|
__decorate([
|
|
7673
7680
|
positionType(0, true)
|
|
7674
|
-
], UI.prototype, "scrollY",
|
|
7681
|
+
], UI.prototype, "scrollY", undefined);
|
|
7675
7682
|
__decorate([
|
|
7676
7683
|
autoLayoutType()
|
|
7677
|
-
], UI.prototype, "origin",
|
|
7684
|
+
], UI.prototype, "origin", undefined);
|
|
7678
7685
|
__decorate([
|
|
7679
7686
|
autoLayoutType()
|
|
7680
|
-
], UI.prototype, "around",
|
|
7687
|
+
], UI.prototype, "around", undefined);
|
|
7681
7688
|
__decorate([
|
|
7682
7689
|
dataType(false)
|
|
7683
|
-
], UI.prototype, "lazy",
|
|
7690
|
+
], UI.prototype, "lazy", undefined);
|
|
7684
7691
|
__decorate([
|
|
7685
7692
|
naturalBoundsType(1)
|
|
7686
|
-
], UI.prototype, "pixelRatio",
|
|
7693
|
+
], UI.prototype, "pixelRatio", undefined);
|
|
7687
7694
|
__decorate([
|
|
7688
7695
|
pathInputType()
|
|
7689
|
-
], UI.prototype, "path",
|
|
7696
|
+
], UI.prototype, "path", undefined);
|
|
7690
7697
|
__decorate([
|
|
7691
7698
|
pathType()
|
|
7692
|
-
], UI.prototype, "windingRule",
|
|
7699
|
+
], UI.prototype, "windingRule", undefined);
|
|
7693
7700
|
__decorate([
|
|
7694
7701
|
pathType(true)
|
|
7695
|
-
], UI.prototype, "closed",
|
|
7702
|
+
], UI.prototype, "closed", undefined);
|
|
7696
7703
|
__decorate([
|
|
7697
7704
|
boundsType(0)
|
|
7698
|
-
], UI.prototype, "padding",
|
|
7705
|
+
], UI.prototype, "padding", undefined);
|
|
7699
7706
|
__decorate([
|
|
7700
7707
|
boundsType(false)
|
|
7701
|
-
], UI.prototype, "lockRatio",
|
|
7708
|
+
], UI.prototype, "lockRatio", undefined);
|
|
7702
7709
|
__decorate([
|
|
7703
7710
|
boundsType()
|
|
7704
|
-
], UI.prototype, "widthRange",
|
|
7711
|
+
], UI.prototype, "widthRange", undefined);
|
|
7705
7712
|
__decorate([
|
|
7706
7713
|
boundsType()
|
|
7707
|
-
], UI.prototype, "heightRange",
|
|
7714
|
+
], UI.prototype, "heightRange", undefined);
|
|
7708
7715
|
__decorate([
|
|
7709
7716
|
dataType(false)
|
|
7710
|
-
], UI.prototype, "draggable",
|
|
7717
|
+
], UI.prototype, "draggable", undefined);
|
|
7711
7718
|
__decorate([
|
|
7712
7719
|
dataType()
|
|
7713
|
-
], UI.prototype, "dragBounds",
|
|
7720
|
+
], UI.prototype, "dragBounds", undefined);
|
|
7714
7721
|
__decorate([
|
|
7715
7722
|
dataType(false)
|
|
7716
|
-
], UI.prototype, "editable",
|
|
7723
|
+
], UI.prototype, "editable", undefined);
|
|
7717
7724
|
__decorate([
|
|
7718
7725
|
hitType(true)
|
|
7719
|
-
], UI.prototype, "hittable",
|
|
7726
|
+
], UI.prototype, "hittable", undefined);
|
|
7720
7727
|
__decorate([
|
|
7721
7728
|
hitType('path')
|
|
7722
|
-
], UI.prototype, "hitFill",
|
|
7729
|
+
], UI.prototype, "hitFill", undefined);
|
|
7723
7730
|
__decorate([
|
|
7724
7731
|
strokeType('path')
|
|
7725
|
-
], UI.prototype, "hitStroke",
|
|
7732
|
+
], UI.prototype, "hitStroke", undefined);
|
|
7726
7733
|
__decorate([
|
|
7727
7734
|
hitType(false)
|
|
7728
|
-
], UI.prototype, "hitBox",
|
|
7735
|
+
], UI.prototype, "hitBox", undefined);
|
|
7729
7736
|
__decorate([
|
|
7730
7737
|
hitType(true)
|
|
7731
|
-
], UI.prototype, "hitChildren",
|
|
7738
|
+
], UI.prototype, "hitChildren", undefined);
|
|
7732
7739
|
__decorate([
|
|
7733
7740
|
hitType(true)
|
|
7734
|
-
], UI.prototype, "hitSelf",
|
|
7741
|
+
], UI.prototype, "hitSelf", undefined);
|
|
7735
7742
|
__decorate([
|
|
7736
7743
|
hitType()
|
|
7737
|
-
], UI.prototype, "hitRadius",
|
|
7744
|
+
], UI.prototype, "hitRadius", undefined);
|
|
7738
7745
|
__decorate([
|
|
7739
7746
|
cursorType('')
|
|
7740
|
-
], UI.prototype, "cursor",
|
|
7747
|
+
], UI.prototype, "cursor", undefined);
|
|
7741
7748
|
__decorate([
|
|
7742
7749
|
surfaceType()
|
|
7743
|
-
], UI.prototype, "fill",
|
|
7750
|
+
], UI.prototype, "fill", undefined);
|
|
7744
7751
|
__decorate([
|
|
7745
7752
|
strokeType()
|
|
7746
|
-
], UI.prototype, "stroke",
|
|
7753
|
+
], UI.prototype, "stroke", undefined);
|
|
7747
7754
|
__decorate([
|
|
7748
7755
|
strokeType('inside')
|
|
7749
|
-
], UI.prototype, "strokeAlign",
|
|
7756
|
+
], UI.prototype, "strokeAlign", undefined);
|
|
7750
7757
|
__decorate([
|
|
7751
7758
|
strokeType(1)
|
|
7752
|
-
], UI.prototype, "strokeWidth",
|
|
7759
|
+
], UI.prototype, "strokeWidth", undefined);
|
|
7753
7760
|
__decorate([
|
|
7754
7761
|
strokeType(false)
|
|
7755
|
-
], UI.prototype, "strokeWidthFixed",
|
|
7762
|
+
], UI.prototype, "strokeWidthFixed", undefined);
|
|
7756
7763
|
__decorate([
|
|
7757
7764
|
strokeType('none')
|
|
7758
|
-
], UI.prototype, "strokeCap",
|
|
7765
|
+
], UI.prototype, "strokeCap", undefined);
|
|
7759
7766
|
__decorate([
|
|
7760
7767
|
strokeType('miter')
|
|
7761
|
-
], UI.prototype, "strokeJoin",
|
|
7768
|
+
], UI.prototype, "strokeJoin", undefined);
|
|
7762
7769
|
__decorate([
|
|
7763
7770
|
strokeType()
|
|
7764
|
-
], UI.prototype, "dashPattern",
|
|
7771
|
+
], UI.prototype, "dashPattern", undefined);
|
|
7765
7772
|
__decorate([
|
|
7766
7773
|
strokeType()
|
|
7767
|
-
], UI.prototype, "dashOffset",
|
|
7774
|
+
], UI.prototype, "dashOffset", undefined);
|
|
7768
7775
|
__decorate([
|
|
7769
7776
|
strokeType(10)
|
|
7770
|
-
], UI.prototype, "miterLimit",
|
|
7777
|
+
], UI.prototype, "miterLimit", undefined);
|
|
7771
7778
|
__decorate([
|
|
7772
7779
|
pathType(0)
|
|
7773
|
-
], UI.prototype, "cornerRadius",
|
|
7780
|
+
], UI.prototype, "cornerRadius", undefined);
|
|
7774
7781
|
__decorate([
|
|
7775
7782
|
pathType()
|
|
7776
|
-
], UI.prototype, "cornerSmoothing",
|
|
7783
|
+
], UI.prototype, "cornerSmoothing", undefined);
|
|
7777
7784
|
__decorate([
|
|
7778
7785
|
effectType()
|
|
7779
|
-
], UI.prototype, "shadow",
|
|
7786
|
+
], UI.prototype, "shadow", undefined);
|
|
7780
7787
|
__decorate([
|
|
7781
7788
|
effectType()
|
|
7782
|
-
], UI.prototype, "innerShadow",
|
|
7789
|
+
], UI.prototype, "innerShadow", undefined);
|
|
7783
7790
|
__decorate([
|
|
7784
7791
|
effectType()
|
|
7785
|
-
], UI.prototype, "blur",
|
|
7792
|
+
], UI.prototype, "blur", undefined);
|
|
7786
7793
|
__decorate([
|
|
7787
7794
|
effectType()
|
|
7788
|
-
], UI.prototype, "backgroundBlur",
|
|
7795
|
+
], UI.prototype, "backgroundBlur", undefined);
|
|
7789
7796
|
__decorate([
|
|
7790
7797
|
effectType()
|
|
7791
|
-
], UI.prototype, "grayscale",
|
|
7798
|
+
], UI.prototype, "grayscale", undefined);
|
|
7792
7799
|
__decorate([
|
|
7793
7800
|
dataType({})
|
|
7794
|
-
], UI.prototype, "data",
|
|
7801
|
+
], UI.prototype, "data", undefined);
|
|
7795
7802
|
__decorate([
|
|
7796
7803
|
rewrite(Leaf.prototype.reset)
|
|
7797
7804
|
], UI.prototype, "reset", null);
|
|
@@ -7852,7 +7859,7 @@ let Group = class Group extends UI {
|
|
|
7852
7859
|
};
|
|
7853
7860
|
__decorate([
|
|
7854
7861
|
dataProcessor(GroupData)
|
|
7855
|
-
], Group.prototype, "__",
|
|
7862
|
+
], Group.prototype, "__", undefined);
|
|
7856
7863
|
Group = __decorate([
|
|
7857
7864
|
useModule(Branch),
|
|
7858
7865
|
registerUI()
|
|
@@ -8023,8 +8030,6 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
8023
8030
|
__setAttr(attrName, newValue) {
|
|
8024
8031
|
if (this.canvas) {
|
|
8025
8032
|
if (canvasSizeAttrs.includes(attrName)) {
|
|
8026
|
-
if (!newValue)
|
|
8027
|
-
debug$1.warn(attrName + ' is 0');
|
|
8028
8033
|
this.__changeCanvasSize(attrName, newValue);
|
|
8029
8034
|
}
|
|
8030
8035
|
else if (attrName === 'fill') {
|
|
@@ -8064,8 +8069,6 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
8064
8069
|
this.created = true;
|
|
8065
8070
|
}
|
|
8066
8071
|
__onReady() {
|
|
8067
|
-
if (this.ready)
|
|
8068
|
-
return;
|
|
8069
8072
|
this.ready = true;
|
|
8070
8073
|
this.emitLeafer(LeaferEvent.BEFORE_READY);
|
|
8071
8074
|
this.emitLeafer(LeaferEvent.READY);
|
|
@@ -8079,6 +8082,20 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
8079
8082
|
this.emitLeafer(LeaferEvent.VIEW_READY);
|
|
8080
8083
|
WaitHelper.run(this.__viewReadyWait);
|
|
8081
8084
|
}
|
|
8085
|
+
__onLayoutEnd() {
|
|
8086
|
+
const { grow, growWidth, growHeight } = this.config;
|
|
8087
|
+
if (grow) {
|
|
8088
|
+
let { width, height, pixelRatio } = this;
|
|
8089
|
+
const bounds = grow === 'box' ? this.worldBoxBounds : this.__world;
|
|
8090
|
+
if (growWidth !== false)
|
|
8091
|
+
width = Math.max(1, bounds.x + bounds.width);
|
|
8092
|
+
if (growHeight !== false)
|
|
8093
|
+
height = Math.max(1, bounds.y + bounds.height);
|
|
8094
|
+
this.__doResize({ width, height, pixelRatio });
|
|
8095
|
+
}
|
|
8096
|
+
if (!this.ready)
|
|
8097
|
+
this.__onReady();
|
|
8098
|
+
}
|
|
8082
8099
|
__onNextRender() {
|
|
8083
8100
|
if (this.viewReady) {
|
|
8084
8101
|
WaitHelper.run(this.__nextRenderWait);
|
|
@@ -8172,10 +8189,9 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
8172
8189
|
const runId = Run.start('FirstCreate ' + this.innerName);
|
|
8173
8190
|
this.once(LeaferEvent.START, () => Run.end(runId));
|
|
8174
8191
|
this.once(LayoutEvent.START, () => this.updateLazyBounds());
|
|
8175
|
-
this.once(LayoutEvent.END, () => this.__onReady());
|
|
8176
8192
|
this.once(RenderEvent.START, () => this.__onCreated());
|
|
8177
8193
|
this.once(RenderEvent.END, () => this.__onViewReady());
|
|
8178
|
-
this.__eventIds.push(this.on_(WatchEvent.DATA, this.__onWatchData, this), this.on_(RenderEvent.NEXT, this.__onNextRender, this));
|
|
8194
|
+
this.__eventIds.push(this.on_(WatchEvent.DATA, this.__onWatchData, this), this.on_(LayoutEvent.END, this.__onLayoutEnd, this), this.on_(RenderEvent.NEXT, this.__onNextRender, this));
|
|
8179
8195
|
}
|
|
8180
8196
|
__removeListenEvents() {
|
|
8181
8197
|
this.off_(this.__eventIds);
|
|
@@ -8216,10 +8232,10 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
8216
8232
|
Leafer.list = new LeafList();
|
|
8217
8233
|
__decorate([
|
|
8218
8234
|
dataProcessor(LeaferData)
|
|
8219
|
-
], Leafer.prototype, "__",
|
|
8235
|
+
], Leafer.prototype, "__", undefined);
|
|
8220
8236
|
__decorate([
|
|
8221
8237
|
boundsType()
|
|
8222
|
-
], Leafer.prototype, "pixelRatio",
|
|
8238
|
+
], Leafer.prototype, "pixelRatio", undefined);
|
|
8223
8239
|
Leafer = Leafer_1 = __decorate([
|
|
8224
8240
|
registerUI()
|
|
8225
8241
|
], Leafer);
|
|
@@ -8232,7 +8248,7 @@ let Rect = class Rect extends UI {
|
|
|
8232
8248
|
};
|
|
8233
8249
|
__decorate([
|
|
8234
8250
|
dataProcessor(RectData)
|
|
8235
|
-
], Rect.prototype, "__",
|
|
8251
|
+
], Rect.prototype, "__", undefined);
|
|
8236
8252
|
Rect = __decorate([
|
|
8237
8253
|
useModule(RectRender),
|
|
8238
8254
|
rewriteAble(),
|
|
@@ -8257,6 +8273,8 @@ let Box = class Box extends Group {
|
|
|
8257
8273
|
const data = this.__;
|
|
8258
8274
|
if (this.children.length) {
|
|
8259
8275
|
if (data.__autoSide) {
|
|
8276
|
+
if (data.__hasSurface)
|
|
8277
|
+
this.__extraUpdate();
|
|
8260
8278
|
super.__updateBoxBounds();
|
|
8261
8279
|
const { boxBounds } = this.__layout;
|
|
8262
8280
|
if (!data.__autoSize) {
|
|
@@ -8321,13 +8339,13 @@ let Box = class Box extends Group {
|
|
|
8321
8339
|
};
|
|
8322
8340
|
__decorate([
|
|
8323
8341
|
dataProcessor(BoxData)
|
|
8324
|
-
], Box.prototype, "__",
|
|
8342
|
+
], Box.prototype, "__", undefined);
|
|
8325
8343
|
__decorate([
|
|
8326
8344
|
dataType(false)
|
|
8327
|
-
], Box.prototype, "resizeChildren",
|
|
8345
|
+
], Box.prototype, "resizeChildren", undefined);
|
|
8328
8346
|
__decorate([
|
|
8329
8347
|
affectRenderBoundsType('show')
|
|
8330
|
-
], Box.prototype, "overflow",
|
|
8348
|
+
], Box.prototype, "overflow", undefined);
|
|
8331
8349
|
__decorate([
|
|
8332
8350
|
rewrite(rect$1.__updateStrokeSpread)
|
|
8333
8351
|
], Box.prototype, "__updateStrokeSpread", null);
|
|
@@ -8366,13 +8384,13 @@ let Frame = class Frame extends Box {
|
|
|
8366
8384
|
};
|
|
8367
8385
|
__decorate([
|
|
8368
8386
|
dataProcessor(FrameData)
|
|
8369
|
-
], Frame.prototype, "__",
|
|
8387
|
+
], Frame.prototype, "__", undefined);
|
|
8370
8388
|
__decorate([
|
|
8371
8389
|
surfaceType('#FFFFFF')
|
|
8372
|
-
], Frame.prototype, "fill",
|
|
8390
|
+
], Frame.prototype, "fill", undefined);
|
|
8373
8391
|
__decorate([
|
|
8374
8392
|
affectRenderBoundsType('hide')
|
|
8375
|
-
], Frame.prototype, "overflow",
|
|
8393
|
+
], Frame.prototype, "overflow", undefined);
|
|
8376
8394
|
Frame = __decorate([
|
|
8377
8395
|
registerUI()
|
|
8378
8396
|
], Frame);
|
|
@@ -8419,16 +8437,16 @@ let Ellipse = class Ellipse extends UI {
|
|
|
8419
8437
|
};
|
|
8420
8438
|
__decorate([
|
|
8421
8439
|
dataProcessor(EllipseData)
|
|
8422
|
-
], Ellipse.prototype, "__",
|
|
8440
|
+
], Ellipse.prototype, "__", undefined);
|
|
8423
8441
|
__decorate([
|
|
8424
8442
|
pathType(0)
|
|
8425
|
-
], Ellipse.prototype, "innerRadius",
|
|
8443
|
+
], Ellipse.prototype, "innerRadius", undefined);
|
|
8426
8444
|
__decorate([
|
|
8427
8445
|
pathType(0)
|
|
8428
|
-
], Ellipse.prototype, "startAngle",
|
|
8446
|
+
], Ellipse.prototype, "startAngle", undefined);
|
|
8429
8447
|
__decorate([
|
|
8430
8448
|
pathType(0)
|
|
8431
|
-
], Ellipse.prototype, "endAngle",
|
|
8449
|
+
], Ellipse.prototype, "endAngle", undefined);
|
|
8432
8450
|
Ellipse = __decorate([
|
|
8433
8451
|
registerUI()
|
|
8434
8452
|
], Ellipse);
|
|
@@ -8487,22 +8505,22 @@ let Line = class Line extends UI {
|
|
|
8487
8505
|
};
|
|
8488
8506
|
__decorate([
|
|
8489
8507
|
dataProcessor(LineData)
|
|
8490
|
-
], Line.prototype, "__",
|
|
8508
|
+
], Line.prototype, "__", undefined);
|
|
8491
8509
|
__decorate([
|
|
8492
8510
|
affectStrokeBoundsType('center')
|
|
8493
|
-
], Line.prototype, "strokeAlign",
|
|
8511
|
+
], Line.prototype, "strokeAlign", undefined);
|
|
8494
8512
|
__decorate([
|
|
8495
8513
|
boundsType(0)
|
|
8496
|
-
], Line.prototype, "height",
|
|
8514
|
+
], Line.prototype, "height", undefined);
|
|
8497
8515
|
__decorate([
|
|
8498
8516
|
pathType()
|
|
8499
|
-
], Line.prototype, "points",
|
|
8517
|
+
], Line.prototype, "points", undefined);
|
|
8500
8518
|
__decorate([
|
|
8501
8519
|
pathType(0)
|
|
8502
|
-
], Line.prototype, "curve",
|
|
8520
|
+
], Line.prototype, "curve", undefined);
|
|
8503
8521
|
__decorate([
|
|
8504
8522
|
pathType(false)
|
|
8505
|
-
], Line.prototype, "closed",
|
|
8523
|
+
], Line.prototype, "closed", undefined);
|
|
8506
8524
|
Line = __decorate([
|
|
8507
8525
|
registerUI()
|
|
8508
8526
|
], Line);
|
|
@@ -8535,16 +8553,16 @@ let Polygon = class Polygon extends UI {
|
|
|
8535
8553
|
};
|
|
8536
8554
|
__decorate([
|
|
8537
8555
|
dataProcessor(PolygonData)
|
|
8538
|
-
], Polygon.prototype, "__",
|
|
8556
|
+
], Polygon.prototype, "__", undefined);
|
|
8539
8557
|
__decorate([
|
|
8540
8558
|
pathType(3)
|
|
8541
|
-
], Polygon.prototype, "sides",
|
|
8559
|
+
], Polygon.prototype, "sides", undefined);
|
|
8542
8560
|
__decorate([
|
|
8543
8561
|
pathType()
|
|
8544
|
-
], Polygon.prototype, "points",
|
|
8562
|
+
], Polygon.prototype, "points", undefined);
|
|
8545
8563
|
__decorate([
|
|
8546
8564
|
pathType(0)
|
|
8547
|
-
], Polygon.prototype, "curve",
|
|
8565
|
+
], Polygon.prototype, "curve", undefined);
|
|
8548
8566
|
__decorate([
|
|
8549
8567
|
rewrite(line.__updateRenderPath)
|
|
8550
8568
|
], Polygon.prototype, "__updateRenderPath", null);
|
|
@@ -8576,13 +8594,13 @@ let Star = class Star extends UI {
|
|
|
8576
8594
|
};
|
|
8577
8595
|
__decorate([
|
|
8578
8596
|
dataProcessor(StarData)
|
|
8579
|
-
], Star.prototype, "__",
|
|
8597
|
+
], Star.prototype, "__", undefined);
|
|
8580
8598
|
__decorate([
|
|
8581
8599
|
pathType(5)
|
|
8582
|
-
], Star.prototype, "corners",
|
|
8600
|
+
], Star.prototype, "corners", undefined);
|
|
8583
8601
|
__decorate([
|
|
8584
8602
|
pathType(0.382)
|
|
8585
|
-
], Star.prototype, "innerRadius",
|
|
8603
|
+
], Star.prototype, "innerRadius", undefined);
|
|
8586
8604
|
Star = __decorate([
|
|
8587
8605
|
registerUI()
|
|
8588
8606
|
], Star);
|
|
@@ -8604,10 +8622,10 @@ let Image$1 = class Image extends Rect {
|
|
|
8604
8622
|
};
|
|
8605
8623
|
__decorate([
|
|
8606
8624
|
dataProcessor(ImageData)
|
|
8607
|
-
], Image$1.prototype, "__",
|
|
8625
|
+
], Image$1.prototype, "__", undefined);
|
|
8608
8626
|
__decorate([
|
|
8609
8627
|
boundsType('')
|
|
8610
|
-
], Image$1.prototype, "url",
|
|
8628
|
+
], Image$1.prototype, "url", undefined);
|
|
8611
8629
|
Image$1 = __decorate([
|
|
8612
8630
|
registerUI()
|
|
8613
8631
|
], Image$1);
|
|
@@ -8670,25 +8688,25 @@ let Canvas = class Canvas extends Rect {
|
|
|
8670
8688
|
};
|
|
8671
8689
|
__decorate([
|
|
8672
8690
|
dataProcessor(CanvasData)
|
|
8673
|
-
], Canvas.prototype, "__",
|
|
8691
|
+
], Canvas.prototype, "__", undefined);
|
|
8674
8692
|
__decorate([
|
|
8675
8693
|
resizeType(100)
|
|
8676
|
-
], Canvas.prototype, "width",
|
|
8694
|
+
], Canvas.prototype, "width", undefined);
|
|
8677
8695
|
__decorate([
|
|
8678
8696
|
resizeType(100)
|
|
8679
|
-
], Canvas.prototype, "height",
|
|
8697
|
+
], Canvas.prototype, "height", undefined);
|
|
8680
8698
|
__decorate([
|
|
8681
8699
|
resizeType(1)
|
|
8682
|
-
], Canvas.prototype, "pixelRatio",
|
|
8700
|
+
], Canvas.prototype, "pixelRatio", undefined);
|
|
8683
8701
|
__decorate([
|
|
8684
8702
|
resizeType(true)
|
|
8685
|
-
], Canvas.prototype, "smooth",
|
|
8703
|
+
], Canvas.prototype, "smooth", undefined);
|
|
8686
8704
|
__decorate([
|
|
8687
8705
|
dataType(false)
|
|
8688
|
-
], Canvas.prototype, "safeResize",
|
|
8706
|
+
], Canvas.prototype, "safeResize", undefined);
|
|
8689
8707
|
__decorate([
|
|
8690
8708
|
resizeType()
|
|
8691
|
-
], Canvas.prototype, "contextSettings",
|
|
8709
|
+
], Canvas.prototype, "contextSettings", undefined);
|
|
8692
8710
|
Canvas = __decorate([
|
|
8693
8711
|
registerUI()
|
|
8694
8712
|
], Canvas);
|
|
@@ -8779,76 +8797,76 @@ let Text = class Text extends UI {
|
|
|
8779
8797
|
};
|
|
8780
8798
|
__decorate([
|
|
8781
8799
|
dataProcessor(TextData)
|
|
8782
|
-
], Text.prototype, "__",
|
|
8800
|
+
], Text.prototype, "__", undefined);
|
|
8783
8801
|
__decorate([
|
|
8784
8802
|
boundsType(0)
|
|
8785
|
-
], Text.prototype, "width",
|
|
8803
|
+
], Text.prototype, "width", undefined);
|
|
8786
8804
|
__decorate([
|
|
8787
8805
|
boundsType(0)
|
|
8788
|
-
], Text.prototype, "height",
|
|
8806
|
+
], Text.prototype, "height", undefined);
|
|
8789
8807
|
__decorate([
|
|
8790
8808
|
dataType(false)
|
|
8791
|
-
], Text.prototype, "resizeFontSize",
|
|
8809
|
+
], Text.prototype, "resizeFontSize", undefined);
|
|
8792
8810
|
__decorate([
|
|
8793
8811
|
surfaceType('#000000')
|
|
8794
|
-
], Text.prototype, "fill",
|
|
8812
|
+
], Text.prototype, "fill", undefined);
|
|
8795
8813
|
__decorate([
|
|
8796
8814
|
affectStrokeBoundsType('outside')
|
|
8797
|
-
], Text.prototype, "strokeAlign",
|
|
8815
|
+
], Text.prototype, "strokeAlign", undefined);
|
|
8798
8816
|
__decorate([
|
|
8799
8817
|
hitType('all')
|
|
8800
|
-
], Text.prototype, "hitFill",
|
|
8818
|
+
], Text.prototype, "hitFill", undefined);
|
|
8801
8819
|
__decorate([
|
|
8802
8820
|
boundsType('')
|
|
8803
|
-
], Text.prototype, "text",
|
|
8821
|
+
], Text.prototype, "text", undefined);
|
|
8804
8822
|
__decorate([
|
|
8805
|
-
boundsType('
|
|
8806
|
-
], Text.prototype, "fontFamily",
|
|
8823
|
+
boundsType('caption')
|
|
8824
|
+
], Text.prototype, "fontFamily", undefined);
|
|
8807
8825
|
__decorate([
|
|
8808
8826
|
boundsType(12)
|
|
8809
|
-
], Text.prototype, "fontSize",
|
|
8827
|
+
], Text.prototype, "fontSize", undefined);
|
|
8810
8828
|
__decorate([
|
|
8811
8829
|
boundsType('normal')
|
|
8812
|
-
], Text.prototype, "fontWeight",
|
|
8830
|
+
], Text.prototype, "fontWeight", undefined);
|
|
8813
8831
|
__decorate([
|
|
8814
8832
|
boundsType(false)
|
|
8815
|
-
], Text.prototype, "italic",
|
|
8833
|
+
], Text.prototype, "italic", undefined);
|
|
8816
8834
|
__decorate([
|
|
8817
8835
|
boundsType('none')
|
|
8818
|
-
], Text.prototype, "textCase",
|
|
8836
|
+
], Text.prototype, "textCase", undefined);
|
|
8819
8837
|
__decorate([
|
|
8820
8838
|
boundsType('none')
|
|
8821
|
-
], Text.prototype, "textDecoration",
|
|
8839
|
+
], Text.prototype, "textDecoration", undefined);
|
|
8822
8840
|
__decorate([
|
|
8823
8841
|
boundsType(0)
|
|
8824
|
-
], Text.prototype, "letterSpacing",
|
|
8842
|
+
], Text.prototype, "letterSpacing", undefined);
|
|
8825
8843
|
__decorate([
|
|
8826
8844
|
boundsType({ type: 'percent', value: 1.5 })
|
|
8827
|
-
], Text.prototype, "lineHeight",
|
|
8845
|
+
], Text.prototype, "lineHeight", undefined);
|
|
8828
8846
|
__decorate([
|
|
8829
8847
|
boundsType(0)
|
|
8830
|
-
], Text.prototype, "paraIndent",
|
|
8848
|
+
], Text.prototype, "paraIndent", undefined);
|
|
8831
8849
|
__decorate([
|
|
8832
8850
|
boundsType(0)
|
|
8833
|
-
], Text.prototype, "paraSpacing",
|
|
8851
|
+
], Text.prototype, "paraSpacing", undefined);
|
|
8834
8852
|
__decorate([
|
|
8835
8853
|
boundsType('x')
|
|
8836
|
-
], Text.prototype, "writingMode",
|
|
8854
|
+
], Text.prototype, "writingMode", undefined);
|
|
8837
8855
|
__decorate([
|
|
8838
8856
|
boundsType('left')
|
|
8839
|
-
], Text.prototype, "textAlign",
|
|
8857
|
+
], Text.prototype, "textAlign", undefined);
|
|
8840
8858
|
__decorate([
|
|
8841
8859
|
boundsType('top')
|
|
8842
|
-
], Text.prototype, "verticalAlign",
|
|
8860
|
+
], Text.prototype, "verticalAlign", undefined);
|
|
8843
8861
|
__decorate([
|
|
8844
8862
|
boundsType(true)
|
|
8845
|
-
], Text.prototype, "autoSizeAlign",
|
|
8863
|
+
], Text.prototype, "autoSizeAlign", undefined);
|
|
8846
8864
|
__decorate([
|
|
8847
8865
|
boundsType('normal')
|
|
8848
|
-
], Text.prototype, "textWrap",
|
|
8866
|
+
], Text.prototype, "textWrap", undefined);
|
|
8849
8867
|
__decorate([
|
|
8850
8868
|
boundsType('show')
|
|
8851
|
-
], Text.prototype, "textOverflow",
|
|
8869
|
+
], Text.prototype, "textOverflow", undefined);
|
|
8852
8870
|
Text = __decorate([
|
|
8853
8871
|
registerUI()
|
|
8854
8872
|
], Text);
|
|
@@ -8861,10 +8879,10 @@ let Path = class Path extends UI {
|
|
|
8861
8879
|
};
|
|
8862
8880
|
__decorate([
|
|
8863
8881
|
dataProcessor(PathData)
|
|
8864
|
-
], Path.prototype, "__",
|
|
8882
|
+
], Path.prototype, "__", undefined);
|
|
8865
8883
|
__decorate([
|
|
8866
8884
|
affectStrokeBoundsType('center')
|
|
8867
|
-
], Path.prototype, "strokeAlign",
|
|
8885
|
+
], Path.prototype, "strokeAlign", undefined);
|
|
8868
8886
|
Path = __decorate([
|
|
8869
8887
|
registerUI()
|
|
8870
8888
|
], Path);
|
|
@@ -8903,10 +8921,10 @@ let Pen = class Pen extends Group {
|
|
|
8903
8921
|
};
|
|
8904
8922
|
__decorate([
|
|
8905
8923
|
dataProcessor(PenData)
|
|
8906
|
-
], Pen.prototype, "__",
|
|
8924
|
+
], Pen.prototype, "__", undefined);
|
|
8907
8925
|
__decorate([
|
|
8908
8926
|
penPathType()
|
|
8909
|
-
], Pen.prototype, "path",
|
|
8927
|
+
], Pen.prototype, "path", undefined);
|
|
8910
8928
|
Pen = __decorate([
|
|
8911
8929
|
useModule(PathCreator, ['set', 'path', 'paint']),
|
|
8912
8930
|
registerUI()
|
|
@@ -9104,34 +9122,34 @@ class UIEvent extends Event {
|
|
|
9104
9122
|
}
|
|
9105
9123
|
}
|
|
9106
9124
|
|
|
9107
|
-
let PointerEvent = class PointerEvent extends UIEvent {
|
|
9125
|
+
let PointerEvent$1 = class PointerEvent extends UIEvent {
|
|
9108
9126
|
};
|
|
9109
|
-
PointerEvent.POINTER = 'pointer';
|
|
9110
|
-
PointerEvent.BEFORE_DOWN = 'pointer.before_down';
|
|
9111
|
-
PointerEvent.BEFORE_MOVE = 'pointer.before_move';
|
|
9112
|
-
PointerEvent.BEFORE_UP = 'pointer.before_up';
|
|
9113
|
-
PointerEvent.DOWN = 'pointer.down';
|
|
9114
|
-
PointerEvent.MOVE = 'pointer.move';
|
|
9115
|
-
PointerEvent.UP = 'pointer.up';
|
|
9116
|
-
PointerEvent.OVER = 'pointer.over';
|
|
9117
|
-
PointerEvent.OUT = 'pointer.out';
|
|
9118
|
-
PointerEvent.ENTER = 'pointer.enter';
|
|
9119
|
-
PointerEvent.LEAVE = 'pointer.leave';
|
|
9120
|
-
PointerEvent.TAP = 'tap';
|
|
9121
|
-
PointerEvent.DOUBLE_TAP = 'double_tap';
|
|
9122
|
-
PointerEvent.CLICK = 'click';
|
|
9123
|
-
PointerEvent.DOUBLE_CLICK = 'double_click';
|
|
9124
|
-
PointerEvent.LONG_PRESS = 'long_press';
|
|
9125
|
-
PointerEvent.LONG_TAP = 'long_tap';
|
|
9126
|
-
PointerEvent.MENU = 'pointer.menu';
|
|
9127
|
-
PointerEvent.MENU_TAP = 'pointer.menu_tap';
|
|
9128
|
-
PointerEvent = __decorate([
|
|
9127
|
+
PointerEvent$1.POINTER = 'pointer';
|
|
9128
|
+
PointerEvent$1.BEFORE_DOWN = 'pointer.before_down';
|
|
9129
|
+
PointerEvent$1.BEFORE_MOVE = 'pointer.before_move';
|
|
9130
|
+
PointerEvent$1.BEFORE_UP = 'pointer.before_up';
|
|
9131
|
+
PointerEvent$1.DOWN = 'pointer.down';
|
|
9132
|
+
PointerEvent$1.MOVE = 'pointer.move';
|
|
9133
|
+
PointerEvent$1.UP = 'pointer.up';
|
|
9134
|
+
PointerEvent$1.OVER = 'pointer.over';
|
|
9135
|
+
PointerEvent$1.OUT = 'pointer.out';
|
|
9136
|
+
PointerEvent$1.ENTER = 'pointer.enter';
|
|
9137
|
+
PointerEvent$1.LEAVE = 'pointer.leave';
|
|
9138
|
+
PointerEvent$1.TAP = 'tap';
|
|
9139
|
+
PointerEvent$1.DOUBLE_TAP = 'double_tap';
|
|
9140
|
+
PointerEvent$1.CLICK = 'click';
|
|
9141
|
+
PointerEvent$1.DOUBLE_CLICK = 'double_click';
|
|
9142
|
+
PointerEvent$1.LONG_PRESS = 'long_press';
|
|
9143
|
+
PointerEvent$1.LONG_TAP = 'long_tap';
|
|
9144
|
+
PointerEvent$1.MENU = 'pointer.menu';
|
|
9145
|
+
PointerEvent$1.MENU_TAP = 'pointer.menu_tap';
|
|
9146
|
+
PointerEvent$1 = __decorate([
|
|
9129
9147
|
registerUIEvent()
|
|
9130
|
-
], PointerEvent);
|
|
9131
|
-
const MyPointerEvent = PointerEvent;
|
|
9148
|
+
], PointerEvent$1);
|
|
9149
|
+
const MyPointerEvent = PointerEvent$1;
|
|
9132
9150
|
|
|
9133
9151
|
const tempMove = {};
|
|
9134
|
-
let DragEvent = class DragEvent extends PointerEvent {
|
|
9152
|
+
let DragEvent$1 = class DragEvent extends PointerEvent$1 {
|
|
9135
9153
|
static setList(data) {
|
|
9136
9154
|
this.list = data instanceof LeafList ? data : new LeafList(data);
|
|
9137
9155
|
}
|
|
@@ -9212,25 +9230,25 @@ let DragEvent = class DragEvent extends PointerEvent {
|
|
|
9212
9230
|
tempMove.y = total ? this.totalY : this.moveY;
|
|
9213
9231
|
}
|
|
9214
9232
|
};
|
|
9215
|
-
DragEvent.BEFORE_DRAG = 'drag.before_drag';
|
|
9216
|
-
DragEvent.START = 'drag.start';
|
|
9217
|
-
DragEvent.DRAG = 'drag';
|
|
9218
|
-
DragEvent.END = 'drag.end';
|
|
9219
|
-
DragEvent.OVER = 'drag.over';
|
|
9220
|
-
DragEvent.OUT = 'drag.out';
|
|
9221
|
-
DragEvent.ENTER = 'drag.enter';
|
|
9222
|
-
DragEvent.LEAVE = 'drag.leave';
|
|
9223
|
-
DragEvent = __decorate([
|
|
9233
|
+
DragEvent$1.BEFORE_DRAG = 'drag.before_drag';
|
|
9234
|
+
DragEvent$1.START = 'drag.start';
|
|
9235
|
+
DragEvent$1.DRAG = 'drag';
|
|
9236
|
+
DragEvent$1.END = 'drag.end';
|
|
9237
|
+
DragEvent$1.OVER = 'drag.over';
|
|
9238
|
+
DragEvent$1.OUT = 'drag.out';
|
|
9239
|
+
DragEvent$1.ENTER = 'drag.enter';
|
|
9240
|
+
DragEvent$1.LEAVE = 'drag.leave';
|
|
9241
|
+
DragEvent$1 = __decorate([
|
|
9224
9242
|
registerUIEvent()
|
|
9225
|
-
], DragEvent);
|
|
9226
|
-
const MyDragEvent = DragEvent;
|
|
9243
|
+
], DragEvent$1);
|
|
9244
|
+
const MyDragEvent = DragEvent$1;
|
|
9227
9245
|
|
|
9228
|
-
let DropEvent = class DropEvent extends PointerEvent {
|
|
9246
|
+
let DropEvent = class DropEvent extends PointerEvent$1 {
|
|
9229
9247
|
static setList(data) {
|
|
9230
|
-
DragEvent.setList(data);
|
|
9248
|
+
DragEvent$1.setList(data);
|
|
9231
9249
|
}
|
|
9232
9250
|
static setData(data) {
|
|
9233
|
-
DragEvent.setData(data);
|
|
9251
|
+
DragEvent$1.setData(data);
|
|
9234
9252
|
}
|
|
9235
9253
|
};
|
|
9236
9254
|
DropEvent.DROP = 'drop';
|
|
@@ -9238,7 +9256,7 @@ DropEvent = __decorate([
|
|
|
9238
9256
|
registerUIEvent()
|
|
9239
9257
|
], DropEvent);
|
|
9240
9258
|
|
|
9241
|
-
let MoveEvent = class MoveEvent extends DragEvent {
|
|
9259
|
+
let MoveEvent = class MoveEvent extends DragEvent$1 {
|
|
9242
9260
|
};
|
|
9243
9261
|
MoveEvent.BEFORE_MOVE = 'move.before_move';
|
|
9244
9262
|
MoveEvent.START = 'move.start';
|
|
@@ -9258,7 +9276,7 @@ RotateEvent = __decorate([
|
|
|
9258
9276
|
registerUIEvent()
|
|
9259
9277
|
], RotateEvent);
|
|
9260
9278
|
|
|
9261
|
-
let SwipeEvent = class SwipeEvent extends DragEvent {
|
|
9279
|
+
let SwipeEvent = class SwipeEvent extends DragEvent$1 {
|
|
9262
9280
|
};
|
|
9263
9281
|
SwipeEvent.SWIPE = 'swipe';
|
|
9264
9282
|
SwipeEvent.LEFT = 'swipe.left';
|
|
@@ -9338,7 +9356,7 @@ const InteractionHelper = {
|
|
|
9338
9356
|
return find;
|
|
9339
9357
|
},
|
|
9340
9358
|
pathCanDrag(path) {
|
|
9341
|
-
return path && path.list.some(item => item.draggable || item.editable || (!item.isLeafer && item.hasEvent(DragEvent.DRAG)));
|
|
9359
|
+
return path && path.list.some(item => item.draggable || item.editable || (!item.isLeafer && item.hasEvent(DragEvent$1.DRAG)));
|
|
9342
9360
|
},
|
|
9343
9361
|
pathHasOutside(path) {
|
|
9344
9362
|
return path && path.list.some(item => item.isOutside);
|
|
@@ -9361,7 +9379,7 @@ class Dragger {
|
|
|
9361
9379
|
}
|
|
9362
9380
|
getList(realDraggable, hover) {
|
|
9363
9381
|
const { proxy } = this.interaction.selector;
|
|
9364
|
-
const hasProxyList = proxy && proxy.list.length, dragList = DragEvent.list || this.draggableList || emptyList;
|
|
9382
|
+
const hasProxyList = proxy && proxy.list.length, dragList = DragEvent$1.list || this.draggableList || emptyList;
|
|
9365
9383
|
return this.dragging && (hasProxyList ? (realDraggable ? emptyList : new LeafList(hover ? [...proxy.list, ...proxy.dragHoverExclude] : proxy.list)) : dragList);
|
|
9366
9384
|
}
|
|
9367
9385
|
checkDrag(data, canDrag) {
|
|
@@ -9385,7 +9403,7 @@ class Dragger {
|
|
|
9385
9403
|
if (!this.dragging) {
|
|
9386
9404
|
this.dragging = canDrag && PointerButton.left(data);
|
|
9387
9405
|
if (this.dragging) {
|
|
9388
|
-
this.interaction.emit(DragEvent.START, this.dragData);
|
|
9406
|
+
this.interaction.emit(DragEvent$1.START, this.dragData);
|
|
9389
9407
|
this.getDraggableList(this.dragData.path);
|
|
9390
9408
|
this.setDragStartPoints(this.realDraggableList = this.getList(true));
|
|
9391
9409
|
}
|
|
@@ -9419,8 +9437,8 @@ class Dragger {
|
|
|
9419
9437
|
}
|
|
9420
9438
|
else if (this.dragging) {
|
|
9421
9439
|
this.dragReal();
|
|
9422
|
-
interaction.emit(DragEvent.BEFORE_DRAG, this.dragData);
|
|
9423
|
-
interaction.emit(DragEvent.DRAG, this.dragData);
|
|
9440
|
+
interaction.emit(DragEvent$1.BEFORE_DRAG, this.dragData);
|
|
9441
|
+
interaction.emit(DragEvent$1.DRAG, this.dragData);
|
|
9424
9442
|
}
|
|
9425
9443
|
}
|
|
9426
9444
|
dragReal() {
|
|
@@ -9428,7 +9446,7 @@ class Dragger {
|
|
|
9428
9446
|
const list = this.realDraggableList;
|
|
9429
9447
|
if (list.length && running) {
|
|
9430
9448
|
const { totalX, totalY } = this.dragData;
|
|
9431
|
-
list.forEach(leaf => leaf.draggable && leaf.move(DragEvent.getValidMove(leaf, this.dragStartPoints[leaf.innerId], { x: totalX, y: totalY })));
|
|
9449
|
+
list.forEach(leaf => leaf.draggable && leaf.move(DragEvent$1.getValidMove(leaf, this.dragStartPoints[leaf.innerId], { x: totalX, y: totalY })));
|
|
9432
9450
|
}
|
|
9433
9451
|
}
|
|
9434
9452
|
dragOverOrOut(data) {
|
|
@@ -9438,19 +9456,19 @@ class Dragger {
|
|
|
9438
9456
|
this.dragOverPath = path;
|
|
9439
9457
|
if (dragOverPath) {
|
|
9440
9458
|
if (path.indexAt(0) !== dragOverPath.indexAt(0)) {
|
|
9441
|
-
interaction.emit(DragEvent.OUT, data, dragOverPath);
|
|
9442
|
-
interaction.emit(DragEvent.OVER, data, path);
|
|
9459
|
+
interaction.emit(DragEvent$1.OUT, data, dragOverPath);
|
|
9460
|
+
interaction.emit(DragEvent$1.OVER, data, path);
|
|
9443
9461
|
}
|
|
9444
9462
|
}
|
|
9445
9463
|
else
|
|
9446
|
-
interaction.emit(DragEvent.OVER, data, path);
|
|
9464
|
+
interaction.emit(DragEvent$1.OVER, data, path);
|
|
9447
9465
|
}
|
|
9448
9466
|
dragEnterOrLeave(data) {
|
|
9449
9467
|
const { interaction } = this;
|
|
9450
9468
|
const { dragEnterPath } = this;
|
|
9451
9469
|
const { path } = data;
|
|
9452
|
-
interaction.emit(DragEvent.LEAVE, data, dragEnterPath, path);
|
|
9453
|
-
interaction.emit(DragEvent.ENTER, data, path, dragEnterPath);
|
|
9470
|
+
interaction.emit(DragEvent$1.LEAVE, data, dragEnterPath, path);
|
|
9471
|
+
interaction.emit(DragEvent$1.ENTER, data, path, dragEnterPath);
|
|
9454
9472
|
this.dragEnterPath = path;
|
|
9455
9473
|
}
|
|
9456
9474
|
dragEnd(data, speed) {
|
|
@@ -9477,7 +9495,7 @@ class Dragger {
|
|
|
9477
9495
|
if (this.dragging) {
|
|
9478
9496
|
const dropList = this.getList();
|
|
9479
9497
|
this.dragging = false;
|
|
9480
|
-
interaction.emit(DragEvent.END, endDragData);
|
|
9498
|
+
interaction.emit(DragEvent$1.END, endDragData);
|
|
9481
9499
|
this.swipe(data, downData, dragData, endDragData);
|
|
9482
9500
|
this.drop(data, dropList, this.dragEnterPath);
|
|
9483
9501
|
}
|
|
@@ -9493,13 +9511,13 @@ class Dragger {
|
|
|
9493
9511
|
}
|
|
9494
9512
|
}
|
|
9495
9513
|
drop(data, dropList, dragEnterPath) {
|
|
9496
|
-
const dropData = getDropEventData(data, dropList, DragEvent.data);
|
|
9514
|
+
const dropData = getDropEventData(data, dropList, DragEvent$1.data);
|
|
9497
9515
|
dropData.path = dragEnterPath;
|
|
9498
9516
|
this.interaction.emit(DropEvent.DROP, dropData);
|
|
9499
|
-
this.interaction.emit(DragEvent.LEAVE, data, dragEnterPath);
|
|
9517
|
+
this.interaction.emit(DragEvent$1.LEAVE, data, dragEnterPath);
|
|
9500
9518
|
}
|
|
9501
9519
|
dragReset() {
|
|
9502
|
-
DragEvent.list = DragEvent.data = this.draggableList = this.dragData = this.downData = this.dragOverPath = this.dragEnterPath = null;
|
|
9520
|
+
DragEvent$1.list = DragEvent$1.data = this.draggableList = this.dragData = this.downData = this.dragOverPath = this.dragEnterPath = null;
|
|
9503
9521
|
}
|
|
9504
9522
|
checkDragEndAnimate(_data, _speed) { return false; }
|
|
9505
9523
|
animate(_func, _off) { }
|
|
@@ -9646,8 +9664,8 @@ class InteractionBase {
|
|
|
9646
9664
|
this.updateDownData(data);
|
|
9647
9665
|
this.checkPath(data, useDefaultPath);
|
|
9648
9666
|
this.downTime = Date.now();
|
|
9649
|
-
this.emit(PointerEvent.BEFORE_DOWN, data);
|
|
9650
|
-
this.emit(PointerEvent.DOWN, data);
|
|
9667
|
+
this.emit(PointerEvent$1.BEFORE_DOWN, data);
|
|
9668
|
+
this.emit(PointerEvent$1.DOWN, data);
|
|
9651
9669
|
if (PointerButton.left(data)) {
|
|
9652
9670
|
this.tapWait();
|
|
9653
9671
|
this.longPressWait(data);
|
|
@@ -9674,7 +9692,7 @@ class InteractionBase {
|
|
|
9674
9692
|
}
|
|
9675
9693
|
pointerMoveReal(data) {
|
|
9676
9694
|
const { dragHover, dragDistance } = this.p;
|
|
9677
|
-
this.emit(PointerEvent.BEFORE_MOVE, data, this.defaultPath);
|
|
9695
|
+
this.emit(PointerEvent$1.BEFORE_MOVE, data, this.defaultPath);
|
|
9678
9696
|
if (this.downData) {
|
|
9679
9697
|
const canDrag = PointHelper.getDistance(this.downData, data) > dragDistance;
|
|
9680
9698
|
if (canDrag) {
|
|
@@ -9687,7 +9705,7 @@ class InteractionBase {
|
|
|
9687
9705
|
if (!this.dragger.moving) {
|
|
9688
9706
|
this.updateHoverData(data);
|
|
9689
9707
|
this.checkPath(data);
|
|
9690
|
-
this.emit(PointerEvent.MOVE, data);
|
|
9708
|
+
this.emit(PointerEvent$1.MOVE, data);
|
|
9691
9709
|
if (!(this.dragging && !dragHover))
|
|
9692
9710
|
this.pointerHover(data);
|
|
9693
9711
|
if (this.dragger.dragging) {
|
|
@@ -9710,8 +9728,8 @@ class InteractionBase {
|
|
|
9710
9728
|
data.path.addList(downData.path.list);
|
|
9711
9729
|
this.checkPath(data);
|
|
9712
9730
|
this.downData = null;
|
|
9713
|
-
this.emit(PointerEvent.BEFORE_UP, data);
|
|
9714
|
-
this.emit(PointerEvent.UP, data);
|
|
9731
|
+
this.emit(PointerEvent$1.BEFORE_UP, data);
|
|
9732
|
+
this.emit(PointerEvent$1.UP, data);
|
|
9715
9733
|
this.touchLeave(data);
|
|
9716
9734
|
if (!data.isCancel) {
|
|
9717
9735
|
this.tap(data);
|
|
@@ -9727,14 +9745,14 @@ class InteractionBase {
|
|
|
9727
9745
|
}
|
|
9728
9746
|
menu(data) {
|
|
9729
9747
|
this.findPath(data);
|
|
9730
|
-
this.emit(PointerEvent.MENU, data);
|
|
9748
|
+
this.emit(PointerEvent$1.MENU, data);
|
|
9731
9749
|
this.waitMenuTap = true;
|
|
9732
9750
|
if (!this.downData && this.waitRightTap)
|
|
9733
9751
|
this.menuTap(data);
|
|
9734
9752
|
}
|
|
9735
9753
|
menuTap(data) {
|
|
9736
9754
|
if (this.waitRightTap && this.waitMenuTap) {
|
|
9737
|
-
this.emit(PointerEvent.MENU_TAP, data);
|
|
9755
|
+
this.emit(PointerEvent$1.MENU_TAP, data);
|
|
9738
9756
|
this.waitRightTap = this.waitMenuTap = false;
|
|
9739
9757
|
}
|
|
9740
9758
|
}
|
|
@@ -9782,12 +9800,12 @@ class InteractionBase {
|
|
|
9782
9800
|
this.overPath = path;
|
|
9783
9801
|
if (overPath) {
|
|
9784
9802
|
if (path.indexAt(0) !== overPath.indexAt(0)) {
|
|
9785
|
-
this.emit(PointerEvent.OUT, data, overPath);
|
|
9786
|
-
this.emit(PointerEvent.OVER, data, path);
|
|
9803
|
+
this.emit(PointerEvent$1.OUT, data, overPath);
|
|
9804
|
+
this.emit(PointerEvent$1.OVER, data, path);
|
|
9787
9805
|
}
|
|
9788
9806
|
}
|
|
9789
9807
|
else {
|
|
9790
|
-
this.emit(PointerEvent.OVER, data, path);
|
|
9808
|
+
this.emit(PointerEvent$1.OVER, data, path);
|
|
9791
9809
|
}
|
|
9792
9810
|
}
|
|
9793
9811
|
pointerEnterOrLeave(data) {
|
|
@@ -9798,13 +9816,13 @@ class InteractionBase {
|
|
|
9798
9816
|
}
|
|
9799
9817
|
const { enterPath } = this;
|
|
9800
9818
|
this.enterPath = path;
|
|
9801
|
-
this.emit(PointerEvent.LEAVE, data, enterPath, path);
|
|
9802
|
-
this.emit(PointerEvent.ENTER, data, path, enterPath);
|
|
9819
|
+
this.emit(PointerEvent$1.LEAVE, data, enterPath, path);
|
|
9820
|
+
this.emit(PointerEvent$1.ENTER, data, path, enterPath);
|
|
9803
9821
|
}
|
|
9804
9822
|
touchLeave(data) {
|
|
9805
9823
|
if (data.pointerType === 'touch') {
|
|
9806
9824
|
if (this.enterPath) {
|
|
9807
|
-
this.emit(PointerEvent.LEAVE, data);
|
|
9825
|
+
this.emit(PointerEvent$1.LEAVE, data);
|
|
9808
9826
|
if (this.dragger.dragging)
|
|
9809
9827
|
this.emit(DropEvent.LEAVE, data);
|
|
9810
9828
|
}
|
|
@@ -9820,7 +9838,7 @@ class InteractionBase {
|
|
|
9820
9838
|
if (pointer.tapMore)
|
|
9821
9839
|
this.emitTap(data);
|
|
9822
9840
|
const useTime = Date.now() - this.downTime;
|
|
9823
|
-
const hasDouble = [PointerEvent.DOUBLE_TAP, PointerEvent.DOUBLE_CLICK].some(type => pathHasEventType(data.path, type));
|
|
9841
|
+
const hasDouble = [PointerEvent$1.DOUBLE_TAP, PointerEvent$1.DOUBLE_CLICK].some(type => pathHasEventType(data.path, type));
|
|
9824
9842
|
if (useTime < pointer.tapTime + 50 && hasDouble) {
|
|
9825
9843
|
this.tapCount++;
|
|
9826
9844
|
if (this.tapCount === 2) {
|
|
@@ -9904,7 +9922,7 @@ class InteractionBase {
|
|
|
9904
9922
|
data = this.hoverData;
|
|
9905
9923
|
if (!data)
|
|
9906
9924
|
return;
|
|
9907
|
-
this.findPath(data, { exclude: this.dragger.getList(false, true), name: PointerEvent.MOVE });
|
|
9925
|
+
this.findPath(data, { exclude: this.dragger.getList(false, true), name: PointerEvent$1.MOVE });
|
|
9908
9926
|
this.hoverData = data;
|
|
9909
9927
|
}
|
|
9910
9928
|
updateCursor(data) {
|
|
@@ -9940,12 +9958,12 @@ class InteractionBase {
|
|
|
9940
9958
|
return { x: clientPoint.clientX - clientBounds.x, y: clientPoint.clientY - clientBounds.y };
|
|
9941
9959
|
}
|
|
9942
9960
|
emitTap(data) {
|
|
9943
|
-
this.emit(PointerEvent.TAP, data);
|
|
9944
|
-
this.emit(PointerEvent.CLICK, data);
|
|
9961
|
+
this.emit(PointerEvent$1.TAP, data);
|
|
9962
|
+
this.emit(PointerEvent$1.CLICK, data);
|
|
9945
9963
|
}
|
|
9946
9964
|
emitDoubleTap(data) {
|
|
9947
|
-
this.emit(PointerEvent.DOUBLE_TAP, data);
|
|
9948
|
-
this.emit(PointerEvent.DOUBLE_CLICK, data);
|
|
9965
|
+
this.emit(PointerEvent$1.DOUBLE_TAP, data);
|
|
9966
|
+
this.emit(PointerEvent$1.DOUBLE_CLICK, data);
|
|
9949
9967
|
}
|
|
9950
9968
|
pointerWaitCancel() {
|
|
9951
9969
|
this.tapWaitCancel();
|
|
@@ -9964,14 +9982,14 @@ class InteractionBase {
|
|
|
9964
9982
|
clearTimeout(this.longPressTimer);
|
|
9965
9983
|
this.longPressTimer = setTimeout(() => {
|
|
9966
9984
|
this.longPressed = true;
|
|
9967
|
-
this.emit(PointerEvent.LONG_PRESS, data);
|
|
9985
|
+
this.emit(PointerEvent$1.LONG_PRESS, data);
|
|
9968
9986
|
}, this.p.longPressTime);
|
|
9969
9987
|
}
|
|
9970
9988
|
longTap(data) {
|
|
9971
9989
|
let hasLong;
|
|
9972
9990
|
if (this.longPressed) {
|
|
9973
|
-
this.emit(PointerEvent.LONG_TAP, data);
|
|
9974
|
-
if (pathHasEventType(data.path, PointerEvent.LONG_TAP) || pathHasEventType(data.path, PointerEvent.LONG_PRESS))
|
|
9991
|
+
this.emit(PointerEvent$1.LONG_TAP, data);
|
|
9992
|
+
if (pathHasEventType(data.path, PointerEvent$1.LONG_TAP) || pathHasEventType(data.path, PointerEvent$1.LONG_PRESS))
|
|
9975
9993
|
hasLong = true;
|
|
9976
9994
|
}
|
|
9977
9995
|
this.longPressWaitCancel();
|
|
@@ -10091,9 +10109,9 @@ leaf.__hitWorld = function (point) {
|
|
|
10091
10109
|
}
|
|
10092
10110
|
return this.__hit(inner);
|
|
10093
10111
|
};
|
|
10094
|
-
leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
10095
|
-
leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
10096
|
-
leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
10112
|
+
leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitFill(inner, this.__.windingRule); };
|
|
10113
|
+
leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitStroke(inner, strokeWidth); };
|
|
10114
|
+
leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitPixel(inner, this.__layout.renderBounds, this.__hitCanvas.hitScale); };
|
|
10097
10115
|
leaf.__drawHitPath = function (canvas) { if (canvas)
|
|
10098
10116
|
this.__drawRenderPath(canvas); };
|
|
10099
10117
|
|
|
@@ -11132,7 +11150,7 @@ function checkImage(ui, canvas, paint, allowPaint) {
|
|
|
11132
11150
|
}
|
|
11133
11151
|
else {
|
|
11134
11152
|
if (!paint.patternTask) {
|
|
11135
|
-
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this,
|
|
11153
|
+
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, undefined, undefined, function* () {
|
|
11136
11154
|
paint.patternTask = null;
|
|
11137
11155
|
if (canvas.bounds.hit(ui.__nowWorld))
|
|
11138
11156
|
createPattern(ui, paint, pixelRatio);
|
|
@@ -11288,7 +11306,7 @@ function shadow(ui, current, shape) {
|
|
|
11288
11306
|
const end = shadow.length - 1;
|
|
11289
11307
|
toOffsetOutBounds$1(bounds, offsetOutBounds$1);
|
|
11290
11308
|
shadow.forEach((item, index) => {
|
|
11291
|
-
other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, item.color);
|
|
11309
|
+
other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, ColorConvert.string(item.color));
|
|
11292
11310
|
spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0;
|
|
11293
11311
|
drawWorldShadow(other, offsetOutBounds$1, spreadScale, shape);
|
|
11294
11312
|
copyBounds = bounds;
|
|
@@ -11364,7 +11382,7 @@ function innerShadow(ui, current, shape) {
|
|
|
11364
11382
|
other.copyWorld(shape.canvas, shapeBounds, bounds, 'source-out');
|
|
11365
11383
|
copyBounds = bounds;
|
|
11366
11384
|
}
|
|
11367
|
-
other.fillWorld(copyBounds, item.color, 'source-in');
|
|
11385
|
+
other.fillWorld(copyBounds, ColorConvert.string(item.color), 'source-in');
|
|
11368
11386
|
if (ui.__worldFlipped) {
|
|
11369
11387
|
current.copyWorldByReset(other, copyBounds, nowWorld, item.blendMode);
|
|
11370
11388
|
}
|
|
@@ -11726,7 +11744,7 @@ function layoutChar(drawData, style, width, _height) {
|
|
|
11726
11744
|
rows.forEach(row => {
|
|
11727
11745
|
if (row.words) {
|
|
11728
11746
|
indentWidth = paraIndent && row.paraStart ? paraIndent : 0;
|
|
11729
|
-
addWordWidth = (width && textAlign === 'justify' && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
|
|
11747
|
+
addWordWidth = (width && (textAlign === 'justify' || textAlign === 'both') && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
|
|
11730
11748
|
mode = (letterSpacing || row.isOverflow) ? CharMode : (addWordWidth > 0.01 ? WordMode : TextMode);
|
|
11731
11749
|
if (row.isOverflow && !letterSpacing)
|
|
11732
11750
|
row.textMode = true;
|
|
@@ -11748,7 +11766,7 @@ function layoutChar(drawData, style, width, _height) {
|
|
|
11748
11766
|
else {
|
|
11749
11767
|
charX = toChar(word.data, charX, row.data, row.isOverflow);
|
|
11750
11768
|
}
|
|
11751
|
-
if (!row.paraEnd
|
|
11769
|
+
if (addWordWidth && (!row.paraEnd || textAlign === 'both')) {
|
|
11752
11770
|
charX += addWordWidth;
|
|
11753
11771
|
row.width += addWordWidth;
|
|
11754
11772
|
}
|
|
@@ -12004,4 +12022,4 @@ Object.assign(Creator, {
|
|
|
12004
12022
|
});
|
|
12005
12023
|
useCanvas();
|
|
12006
12024
|
|
|
12007
|
-
export { AlignHelper, Answer, App, AroundHelper, AutoBounds, BezierHelper, Bounds, BoundsHelper, Box, BoxData, Branch, BranchHelper, BranchRender, Canvas, CanvasData, CanvasManager, ChildEvent, ColorConvert, Creator, Cursor, DataHelper, Debug, Direction4, Direction9, DragEvent, Dragger, DropEvent, Effect, Ellipse, EllipseData, EllipseHelper, Event, EventCreator, Eventer, Export, FileHelper, Frame, FrameData, Group, GroupData, HitCanvasManager, Image$1 as Image, ImageData, ImageEvent, ImageManager, IncrementId, Interaction, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferData, LeaferEvent, LeaferImage, Line, LineData, MathHelper, Matrix, MatrixHelper, MoveEvent, MyDragEvent, MyImage, MyPointerEvent, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, PaintGradient, PaintImage, Path, PathArrow, PathBounds, PathCommandDataHelper, PathCommandMap, PathConvert, PathCorner, PathCreator, PathData, PathDrawer, PathHelper, PathNumberCommandLengthMap, PathNumberCommandMap, Pen, PenData, Picker, Platform, Plugin, Point, PointHelper, PointerButton, PointerEvent, Polygon, PolygonData, PropertyEvent, Rect, RectData, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, RotateEvent, Run, Selector, Star, StarData, State, StringNumberMap, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert, TextData, Transition, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIData, UIEvent, UIRender, UnitConvert, WaitHelper, WatchEvent, Watcher, ZoomEvent, affectRenderBoundsType, affectStrokeBoundsType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, doBoundsType, doStrokeType, effectType, emptyData, eraserType, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isNull, layoutProcessor, maskType, naturalBoundsType, opacityType, pathInputType, pathType, pen, positionType, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleType, sortType, strokeType, surfaceType, tempBounds$1 as tempBounds, tempMatrix, tempPoint$3 as tempPoint, useCanvas, useModule, version, visibleType, zoomLayerType };
|
|
12025
|
+
export { AlignHelper, Answer, App, AroundHelper, AutoBounds, BezierHelper, Bounds, BoundsHelper, Box, BoxData, Branch, BranchHelper, BranchRender, Canvas, CanvasData, CanvasManager, ChildEvent, ColorConvert, Creator, Cursor, DataHelper, Debug, Direction4, Direction9, DragEvent$1 as DragEvent, Dragger, DropEvent, Effect, Ellipse, EllipseData, EllipseHelper, Event, EventCreator, Eventer, Export, FileHelper, Frame, FrameData, Group, GroupData, HitCanvasManager, Image$1 as Image, ImageData, ImageEvent, ImageManager, IncrementId, Interaction, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferData, LeaferEvent, LeaferImage, Line, LineData, MathHelper, Matrix, MatrixHelper, MoveEvent, MyDragEvent, MyImage, MyPointerEvent, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, PaintGradient, PaintImage, Path, PathArrow, PathBounds, PathCommandDataHelper, PathCommandMap, PathConvert, PathCorner, PathCreator, PathData, PathDrawer, PathHelper, PathNumberCommandLengthMap, PathNumberCommandMap, Pen, PenData, Picker, Platform, Plugin, Point, PointHelper, PointerButton, PointerEvent$1 as PointerEvent, Polygon, PolygonData, PropertyEvent, Rect, RectData, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, RotateEvent, Run, Selector, Star, StarData, State, StringNumberMap, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert, TextData, Transition, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIData, UIEvent, UIRender, UnitConvert, WaitHelper, WatchEvent, Watcher, ZoomEvent, affectRenderBoundsType, affectStrokeBoundsType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, doBoundsType, doStrokeType, effectType, emptyData, eraserType, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isNull, layoutProcessor, maskType, naturalBoundsType, opacityType, pathInputType, pathType, pen, positionType, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleType, sortType, strokeType, surfaceType, tempBounds$1 as tempBounds, tempMatrix, tempPoint$3 as tempPoint, useCanvas, useModule, version, visibleType, zoomLayerType };
|