@leafer-draw/worker 1.3.2 → 1.4.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/worker.cjs +11 -10
- package/dist/worker.cjs.map +1 -0
- package/dist/worker.esm.js +11 -10
- package/dist/worker.esm.js.map +1 -0
- package/dist/worker.esm.min.js +2 -1
- package/dist/worker.esm.min.js.map +1 -0
- package/dist/worker.js +240 -233
- package/dist/worker.js.map +1 -0
- package/dist/worker.min.cjs +2 -1
- package/dist/worker.min.cjs.map +1 -0
- package/dist/worker.min.js +2 -1
- package/dist/worker.min.js.map +1 -0
- package/dist/worker.module.js +240 -233
- package/dist/worker.module.js.map +1 -0
- package/dist/worker.module.min.js +2 -1
- package/dist/worker.module.min.js.map +1 -0
- package/package.json +12 -12
package/dist/worker.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;
|
|
@@ -3821,10 +3821,10 @@ function autoLayoutType(defaultValue) {
|
|
|
3821
3821
|
return decorateLeafAttr(defaultValue, (key) => attr({
|
|
3822
3822
|
set(value) {
|
|
3823
3823
|
if (this.__setAttr(key, value)) {
|
|
3824
|
-
this.__layout.matrixChanged || this.__layout.matrixChange();
|
|
3825
3824
|
this.__hasAutoLayout = !!(this.origin || this.around || this.flow);
|
|
3826
3825
|
if (!this.__local)
|
|
3827
3826
|
this.__layout.createLocal();
|
|
3827
|
+
doBoundsType(this);
|
|
3828
3828
|
}
|
|
3829
3829
|
}
|
|
3830
3830
|
}));
|
|
@@ -4207,55 +4207,62 @@ const LeafHelper = {
|
|
|
4207
4207
|
y += t.y;
|
|
4208
4208
|
transition ? t.animate({ x, y }, transition) : (t.x = x, t.y = y);
|
|
4209
4209
|
},
|
|
4210
|
-
zoomOfWorld(t, origin, scaleX, scaleY, resize) {
|
|
4211
|
-
L.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize);
|
|
4210
|
+
zoomOfWorld(t, origin, scaleX, scaleY, resize, transition) {
|
|
4211
|
+
L.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize, transition);
|
|
4212
4212
|
},
|
|
4213
|
-
zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize) {
|
|
4214
|
-
|
|
4213
|
+
zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize, transition) {
|
|
4214
|
+
const o = t.__localMatrix;
|
|
4215
|
+
if (typeof scaleY !== 'number') {
|
|
4216
|
+
if (scaleY)
|
|
4217
|
+
transition = scaleY;
|
|
4218
|
+
scaleY = scaleX;
|
|
4219
|
+
}
|
|
4220
|
+
copy$6(matrix, o);
|
|
4215
4221
|
scaleOfOuter$2(matrix, origin, scaleX, scaleY);
|
|
4216
4222
|
if (t.origin || t.around) {
|
|
4217
|
-
L.setTransform(t, matrix, resize);
|
|
4223
|
+
L.setTransform(t, matrix, resize, transition);
|
|
4218
4224
|
}
|
|
4219
4225
|
else {
|
|
4220
|
-
|
|
4221
|
-
|
|
4226
|
+
const x = t.x + matrix.e - o.e, y = t.y + matrix.f - o.f;
|
|
4227
|
+
if (transition && !resize)
|
|
4228
|
+
t.animate({ x, y, scaleX: t.scaleX * scaleX, scaleY: t.scaleY * scaleY }, transition);
|
|
4229
|
+
else
|
|
4230
|
+
t.x = x, t.y = y, t.scaleResize(scaleX, scaleY, resize !== true);
|
|
4222
4231
|
}
|
|
4223
4232
|
},
|
|
4224
|
-
rotateOfWorld(t, origin, angle) {
|
|
4225
|
-
L.rotateOfLocal(t, getTempLocal(t, origin), angle);
|
|
4233
|
+
rotateOfWorld(t, origin, angle, transition) {
|
|
4234
|
+
L.rotateOfLocal(t, getTempLocal(t, origin), angle, transition);
|
|
4226
4235
|
},
|
|
4227
|
-
rotateOfLocal(t, origin, angle) {
|
|
4228
|
-
|
|
4236
|
+
rotateOfLocal(t, origin, angle, transition) {
|
|
4237
|
+
const o = t.__localMatrix;
|
|
4238
|
+
copy$6(matrix, o);
|
|
4229
4239
|
rotateOfOuter$2(matrix, origin, angle);
|
|
4230
|
-
if (t.origin || t.around)
|
|
4231
|
-
L.setTransform(t, matrix);
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
moveByMatrix(t, matrix);
|
|
4235
|
-
t.rotation = MathHelper.formatRotation(t.rotation + angle);
|
|
4236
|
-
}
|
|
4240
|
+
if (t.origin || t.around)
|
|
4241
|
+
L.setTransform(t, matrix, false, transition);
|
|
4242
|
+
else
|
|
4243
|
+
t.set({ x: t.x + matrix.e - o.e, y: t.y + matrix.f - o.f, rotation: MathHelper.formatRotation(t.rotation + angle) }, transition);
|
|
4237
4244
|
},
|
|
4238
|
-
skewOfWorld(t, origin, skewX, skewY, resize) {
|
|
4239
|
-
L.skewOfLocal(t, getTempLocal(t, origin), skewX, skewY, resize);
|
|
4245
|
+
skewOfWorld(t, origin, skewX, skewY, resize, transition) {
|
|
4246
|
+
L.skewOfLocal(t, getTempLocal(t, origin), skewX, skewY, resize, transition);
|
|
4240
4247
|
},
|
|
4241
|
-
skewOfLocal(t, origin, skewX, skewY = 0, resize) {
|
|
4248
|
+
skewOfLocal(t, origin, skewX, skewY = 0, resize, transition) {
|
|
4242
4249
|
copy$6(matrix, t.__localMatrix);
|
|
4243
4250
|
skewOfOuter(matrix, origin, skewX, skewY);
|
|
4244
|
-
L.setTransform(t, matrix, resize);
|
|
4251
|
+
L.setTransform(t, matrix, resize, transition);
|
|
4245
4252
|
},
|
|
4246
|
-
transformWorld(t, transform, resize) {
|
|
4253
|
+
transformWorld(t, transform, resize, transition) {
|
|
4247
4254
|
copy$6(matrix, t.worldTransform);
|
|
4248
4255
|
multiplyParent$2(matrix, transform);
|
|
4249
4256
|
if (t.parent)
|
|
4250
4257
|
divideParent(matrix, t.parent.worldTransform);
|
|
4251
|
-
L.setTransform(t, matrix, resize);
|
|
4258
|
+
L.setTransform(t, matrix, resize, transition);
|
|
4252
4259
|
},
|
|
4253
|
-
transform(t, transform, resize) {
|
|
4260
|
+
transform(t, transform, resize, transition) {
|
|
4254
4261
|
copy$6(matrix, t.localTransform);
|
|
4255
4262
|
multiplyParent$2(matrix, transform);
|
|
4256
|
-
L.setTransform(t, matrix, resize);
|
|
4263
|
+
L.setTransform(t, matrix, resize, transition);
|
|
4257
4264
|
},
|
|
4258
|
-
setTransform(t, transform, resize) {
|
|
4265
|
+
setTransform(t, transform, resize, transition) {
|
|
4259
4266
|
const data = t.__, originPoint = data.origin && L.getInnerOrigin(t, data.origin);
|
|
4260
4267
|
const layout = getLayout(transform, originPoint, data.around && L.getInnerOrigin(t, data.around));
|
|
4261
4268
|
if (resize) {
|
|
@@ -4270,7 +4277,7 @@ const LeafHelper = {
|
|
|
4270
4277
|
t.scaleResize(scaleX, scaleY, false);
|
|
4271
4278
|
}
|
|
4272
4279
|
else
|
|
4273
|
-
t.set(layout);
|
|
4280
|
+
t.set(layout, transition);
|
|
4274
4281
|
},
|
|
4275
4282
|
getFlipTransform(t, axis) {
|
|
4276
4283
|
const m = getMatrixData();
|
|
@@ -4307,11 +4314,6 @@ const LeafHelper = {
|
|
|
4307
4314
|
};
|
|
4308
4315
|
const L = LeafHelper;
|
|
4309
4316
|
const { updateAllMatrix: updateAllMatrix$3, updateMatrix: updateMatrix$2, updateAllWorldOpacity: updateAllWorldOpacity$1, updateAllChange: updateAllChange$1 } = L;
|
|
4310
|
-
function moveByMatrix(t, matrix) {
|
|
4311
|
-
const { e, f } = t.__localMatrix;
|
|
4312
|
-
t.x += matrix.e - e;
|
|
4313
|
-
t.y += matrix.f - f;
|
|
4314
|
-
}
|
|
4315
4317
|
function getTempLocal(t, world) {
|
|
4316
4318
|
t.__layout.update();
|
|
4317
4319
|
return t.parent ? PointHelper.tempToInnerOf(world, t.parent.__world) : world;
|
|
@@ -5175,8 +5177,7 @@ const LeafBounds = {
|
|
|
5175
5177
|
__updateAutoLayout() {
|
|
5176
5178
|
this.__layout.matrixChanged = true;
|
|
5177
5179
|
if (this.isBranch) {
|
|
5178
|
-
|
|
5179
|
-
this.leafer.layouter.addExtra(this);
|
|
5180
|
+
this.__extraUpdate();
|
|
5180
5181
|
if (this.__.flow) {
|
|
5181
5182
|
if (this.__layout.boxChanged)
|
|
5182
5183
|
this.__updateFlowLayout();
|
|
@@ -5329,7 +5330,7 @@ let Leaf = class Leaf {
|
|
|
5329
5330
|
get __worldFlipped() { return this.__world.scaleX < 0 || this.__world.scaleY < 0; }
|
|
5330
5331
|
get __onlyHitMask() { return this.__hasMask && !this.__.hitChildren; }
|
|
5331
5332
|
get __ignoreHitWorld() { return (this.__hasMask || this.__hasEraser) && this.__.hitChildren; }
|
|
5332
|
-
get __inLazyBounds() {
|
|
5333
|
+
get __inLazyBounds() { return this.leaferIsCreated && this.leafer.lazyBounds.hit(this.__world); }
|
|
5333
5334
|
get pathInputed() { return this.__.__pathInputed; }
|
|
5334
5335
|
set event(map) { this.on(map); }
|
|
5335
5336
|
constructor(data) {
|
|
@@ -5440,6 +5441,10 @@ let Leaf = class Leaf {
|
|
|
5440
5441
|
forceRender(_bounds, _sync) {
|
|
5441
5442
|
this.forceUpdate('surface');
|
|
5442
5443
|
}
|
|
5444
|
+
__extraUpdate() {
|
|
5445
|
+
if (this.leaferIsReady)
|
|
5446
|
+
this.leafer.layouter.addExtra(this);
|
|
5447
|
+
}
|
|
5443
5448
|
__updateWorldMatrix() { }
|
|
5444
5449
|
__updateLocalMatrix() { }
|
|
5445
5450
|
__updateWorldBounds() { }
|
|
@@ -5582,11 +5587,11 @@ let Leaf = class Leaf {
|
|
|
5582
5587
|
const layer = this.leafer ? this.leafer.zoomLayer : this;
|
|
5583
5588
|
return layer.getWorldPoint(page, relative, distance, change);
|
|
5584
5589
|
}
|
|
5585
|
-
setTransform(matrix, resize) {
|
|
5586
|
-
setTransform(this, matrix, resize);
|
|
5590
|
+
setTransform(matrix, resize, transition) {
|
|
5591
|
+
setTransform(this, matrix, resize, transition);
|
|
5587
5592
|
}
|
|
5588
|
-
transform(matrix, resize) {
|
|
5589
|
-
transform(this, matrix, resize);
|
|
5593
|
+
transform(matrix, resize, transition) {
|
|
5594
|
+
transform(this, matrix, resize, transition);
|
|
5590
5595
|
}
|
|
5591
5596
|
move(x, y, transition) {
|
|
5592
5597
|
moveLocal(this, x, y, transition);
|
|
@@ -5594,32 +5599,32 @@ let Leaf = class Leaf {
|
|
|
5594
5599
|
moveInner(x, y, transition) {
|
|
5595
5600
|
moveWorld(this, x, y, true, transition);
|
|
5596
5601
|
}
|
|
5597
|
-
scaleOf(origin, scaleX, scaleY, resize) {
|
|
5598
|
-
zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize);
|
|
5602
|
+
scaleOf(origin, scaleX, scaleY, resize, transition) {
|
|
5603
|
+
zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize, transition);
|
|
5599
5604
|
}
|
|
5600
|
-
rotateOf(origin, rotation) {
|
|
5601
|
-
rotateOfLocal(this, getLocalOrigin(this, origin), rotation);
|
|
5605
|
+
rotateOf(origin, rotation, transition) {
|
|
5606
|
+
rotateOfLocal(this, getLocalOrigin(this, origin), rotation, transition);
|
|
5602
5607
|
}
|
|
5603
|
-
skewOf(origin, skewX, skewY, resize) {
|
|
5604
|
-
skewOfLocal(this, getLocalOrigin(this, origin), skewX, skewY, resize);
|
|
5608
|
+
skewOf(origin, skewX, skewY, resize, transition) {
|
|
5609
|
+
skewOfLocal(this, getLocalOrigin(this, origin), skewX, skewY, resize, transition);
|
|
5605
5610
|
}
|
|
5606
|
-
transformWorld(worldTransform, resize) {
|
|
5607
|
-
transformWorld(this, worldTransform, resize);
|
|
5611
|
+
transformWorld(worldTransform, resize, transition) {
|
|
5612
|
+
transformWorld(this, worldTransform, resize, transition);
|
|
5608
5613
|
}
|
|
5609
5614
|
moveWorld(x, y, transition) {
|
|
5610
5615
|
moveWorld(this, x, y, false, transition);
|
|
5611
5616
|
}
|
|
5612
|
-
scaleOfWorld(worldOrigin, scaleX, scaleY, resize) {
|
|
5613
|
-
zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize);
|
|
5617
|
+
scaleOfWorld(worldOrigin, scaleX, scaleY, resize, transition) {
|
|
5618
|
+
zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize, transition);
|
|
5614
5619
|
}
|
|
5615
5620
|
rotateOfWorld(worldOrigin, rotation) {
|
|
5616
5621
|
rotateOfWorld(this, worldOrigin, rotation);
|
|
5617
5622
|
}
|
|
5618
|
-
skewOfWorld(worldOrigin, skewX, skewY, resize) {
|
|
5619
|
-
skewOfWorld(this, worldOrigin, skewX, skewY, resize);
|
|
5623
|
+
skewOfWorld(worldOrigin, skewX, skewY, resize, transition) {
|
|
5624
|
+
skewOfWorld(this, worldOrigin, skewX, skewY, resize, transition);
|
|
5620
5625
|
}
|
|
5621
|
-
flip(axis) {
|
|
5622
|
-
transform(this, getFlipTransform(this, axis));
|
|
5626
|
+
flip(axis, transition) {
|
|
5627
|
+
transform(this, getFlipTransform(this, axis), false, transition);
|
|
5623
5628
|
}
|
|
5624
5629
|
scaleResize(scaleX, scaleY = scaleX, _noResize) {
|
|
5625
5630
|
this.scaleX *= scaleX;
|
|
@@ -6007,7 +6012,7 @@ class LeafLevelList {
|
|
|
6007
6012
|
}
|
|
6008
6013
|
}
|
|
6009
6014
|
|
|
6010
|
-
const version = "1.
|
|
6015
|
+
const version = "1.4.0";
|
|
6011
6016
|
|
|
6012
6017
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6013
6018
|
get allowBackgroundColor() { return true; }
|
|
@@ -6352,7 +6357,7 @@ class Layouter {
|
|
|
6352
6357
|
}
|
|
6353
6358
|
partLayout() {
|
|
6354
6359
|
var _a;
|
|
6355
|
-
if (!((_a = this.__updatedList) === null || _a ===
|
|
6360
|
+
if (!((_a = this.__updatedList) === null || _a === undefined ? undefined : _a.length))
|
|
6356
6361
|
return;
|
|
6357
6362
|
const t = Run.start('PartLayout');
|
|
6358
6363
|
const { target, __updatedList: updateList } = this;
|
|
@@ -6767,6 +6772,7 @@ class UIData extends LeafData {
|
|
|
6767
6772
|
return t.fill && this.__hasStroke;
|
|
6768
6773
|
}
|
|
6769
6774
|
get __clipAfterFill() { const t = this; return (t.cornerRadius || t.innerShadow || t.__pathInputed); }
|
|
6775
|
+
get __hasSurface() { const t = this; return (t.fill || t.stroke); }
|
|
6770
6776
|
get __autoWidth() { return !this._width; }
|
|
6771
6777
|
get __autoHeight() { return !this._height; }
|
|
6772
6778
|
get __autoSide() { return !this._width || !this._height; }
|
|
@@ -7270,199 +7276,199 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
7270
7276
|
};
|
|
7271
7277
|
__decorate([
|
|
7272
7278
|
dataProcessor(UIData)
|
|
7273
|
-
], UI.prototype, "__",
|
|
7279
|
+
], UI.prototype, "__", undefined);
|
|
7274
7280
|
__decorate([
|
|
7275
7281
|
zoomLayerType()
|
|
7276
|
-
], UI.prototype, "zoomLayer",
|
|
7282
|
+
], UI.prototype, "zoomLayer", undefined);
|
|
7277
7283
|
__decorate([
|
|
7278
7284
|
dataType('')
|
|
7279
|
-
], UI.prototype, "id",
|
|
7285
|
+
], UI.prototype, "id", undefined);
|
|
7280
7286
|
__decorate([
|
|
7281
7287
|
dataType('')
|
|
7282
|
-
], UI.prototype, "name",
|
|
7288
|
+
], UI.prototype, "name", undefined);
|
|
7283
7289
|
__decorate([
|
|
7284
7290
|
dataType('')
|
|
7285
|
-
], UI.prototype, "className",
|
|
7291
|
+
], UI.prototype, "className", undefined);
|
|
7286
7292
|
__decorate([
|
|
7287
7293
|
surfaceType('pass-through')
|
|
7288
|
-
], UI.prototype, "blendMode",
|
|
7294
|
+
], UI.prototype, "blendMode", undefined);
|
|
7289
7295
|
__decorate([
|
|
7290
7296
|
opacityType(1)
|
|
7291
|
-
], UI.prototype, "opacity",
|
|
7297
|
+
], UI.prototype, "opacity", undefined);
|
|
7292
7298
|
__decorate([
|
|
7293
7299
|
visibleType(true)
|
|
7294
|
-
], UI.prototype, "visible",
|
|
7300
|
+
], UI.prototype, "visible", undefined);
|
|
7295
7301
|
__decorate([
|
|
7296
7302
|
surfaceType(false)
|
|
7297
|
-
], UI.prototype, "locked",
|
|
7303
|
+
], UI.prototype, "locked", undefined);
|
|
7298
7304
|
__decorate([
|
|
7299
7305
|
sortType(0)
|
|
7300
|
-
], UI.prototype, "zIndex",
|
|
7306
|
+
], UI.prototype, "zIndex", undefined);
|
|
7301
7307
|
__decorate([
|
|
7302
7308
|
maskType(false)
|
|
7303
|
-
], UI.prototype, "mask",
|
|
7309
|
+
], UI.prototype, "mask", undefined);
|
|
7304
7310
|
__decorate([
|
|
7305
7311
|
eraserType(false)
|
|
7306
|
-
], UI.prototype, "eraser",
|
|
7312
|
+
], UI.prototype, "eraser", undefined);
|
|
7307
7313
|
__decorate([
|
|
7308
7314
|
positionType(0, true)
|
|
7309
|
-
], UI.prototype, "x",
|
|
7315
|
+
], UI.prototype, "x", undefined);
|
|
7310
7316
|
__decorate([
|
|
7311
7317
|
positionType(0, true)
|
|
7312
|
-
], UI.prototype, "y",
|
|
7318
|
+
], UI.prototype, "y", undefined);
|
|
7313
7319
|
__decorate([
|
|
7314
7320
|
boundsType(100, true)
|
|
7315
|
-
], UI.prototype, "width",
|
|
7321
|
+
], UI.prototype, "width", undefined);
|
|
7316
7322
|
__decorate([
|
|
7317
7323
|
boundsType(100, true)
|
|
7318
|
-
], UI.prototype, "height",
|
|
7324
|
+
], UI.prototype, "height", undefined);
|
|
7319
7325
|
__decorate([
|
|
7320
7326
|
scaleType(1, true)
|
|
7321
|
-
], UI.prototype, "scaleX",
|
|
7327
|
+
], UI.prototype, "scaleX", undefined);
|
|
7322
7328
|
__decorate([
|
|
7323
7329
|
scaleType(1, true)
|
|
7324
|
-
], UI.prototype, "scaleY",
|
|
7330
|
+
], UI.prototype, "scaleY", undefined);
|
|
7325
7331
|
__decorate([
|
|
7326
7332
|
rotationType(0, true)
|
|
7327
|
-
], UI.prototype, "rotation",
|
|
7333
|
+
], UI.prototype, "rotation", undefined);
|
|
7328
7334
|
__decorate([
|
|
7329
7335
|
rotationType(0, true)
|
|
7330
|
-
], UI.prototype, "skewX",
|
|
7336
|
+
], UI.prototype, "skewX", undefined);
|
|
7331
7337
|
__decorate([
|
|
7332
7338
|
rotationType(0, true)
|
|
7333
|
-
], UI.prototype, "skewY",
|
|
7339
|
+
], UI.prototype, "skewY", undefined);
|
|
7334
7340
|
__decorate([
|
|
7335
7341
|
positionType(0, true)
|
|
7336
|
-
], UI.prototype, "offsetX",
|
|
7342
|
+
], UI.prototype, "offsetX", undefined);
|
|
7337
7343
|
__decorate([
|
|
7338
7344
|
positionType(0, true)
|
|
7339
|
-
], UI.prototype, "offsetY",
|
|
7345
|
+
], UI.prototype, "offsetY", undefined);
|
|
7340
7346
|
__decorate([
|
|
7341
7347
|
positionType(0, true)
|
|
7342
|
-
], UI.prototype, "scrollX",
|
|
7348
|
+
], UI.prototype, "scrollX", undefined);
|
|
7343
7349
|
__decorate([
|
|
7344
7350
|
positionType(0, true)
|
|
7345
|
-
], UI.prototype, "scrollY",
|
|
7351
|
+
], UI.prototype, "scrollY", undefined);
|
|
7346
7352
|
__decorate([
|
|
7347
7353
|
autoLayoutType()
|
|
7348
|
-
], UI.prototype, "origin",
|
|
7354
|
+
], UI.prototype, "origin", undefined);
|
|
7349
7355
|
__decorate([
|
|
7350
7356
|
autoLayoutType()
|
|
7351
|
-
], UI.prototype, "around",
|
|
7357
|
+
], UI.prototype, "around", undefined);
|
|
7352
7358
|
__decorate([
|
|
7353
7359
|
dataType(false)
|
|
7354
|
-
], UI.prototype, "lazy",
|
|
7360
|
+
], UI.prototype, "lazy", undefined);
|
|
7355
7361
|
__decorate([
|
|
7356
7362
|
naturalBoundsType(1)
|
|
7357
|
-
], UI.prototype, "pixelRatio",
|
|
7363
|
+
], UI.prototype, "pixelRatio", undefined);
|
|
7358
7364
|
__decorate([
|
|
7359
7365
|
pathInputType()
|
|
7360
|
-
], UI.prototype, "path",
|
|
7366
|
+
], UI.prototype, "path", undefined);
|
|
7361
7367
|
__decorate([
|
|
7362
7368
|
pathType()
|
|
7363
|
-
], UI.prototype, "windingRule",
|
|
7369
|
+
], UI.prototype, "windingRule", undefined);
|
|
7364
7370
|
__decorate([
|
|
7365
7371
|
pathType(true)
|
|
7366
|
-
], UI.prototype, "closed",
|
|
7372
|
+
], UI.prototype, "closed", undefined);
|
|
7367
7373
|
__decorate([
|
|
7368
7374
|
boundsType(0)
|
|
7369
|
-
], UI.prototype, "padding",
|
|
7375
|
+
], UI.prototype, "padding", undefined);
|
|
7370
7376
|
__decorate([
|
|
7371
7377
|
boundsType(false)
|
|
7372
|
-
], UI.prototype, "lockRatio",
|
|
7378
|
+
], UI.prototype, "lockRatio", undefined);
|
|
7373
7379
|
__decorate([
|
|
7374
7380
|
boundsType()
|
|
7375
|
-
], UI.prototype, "widthRange",
|
|
7381
|
+
], UI.prototype, "widthRange", undefined);
|
|
7376
7382
|
__decorate([
|
|
7377
7383
|
boundsType()
|
|
7378
|
-
], UI.prototype, "heightRange",
|
|
7384
|
+
], UI.prototype, "heightRange", undefined);
|
|
7379
7385
|
__decorate([
|
|
7380
7386
|
dataType(false)
|
|
7381
|
-
], UI.prototype, "draggable",
|
|
7387
|
+
], UI.prototype, "draggable", undefined);
|
|
7382
7388
|
__decorate([
|
|
7383
7389
|
dataType()
|
|
7384
|
-
], UI.prototype, "dragBounds",
|
|
7390
|
+
], UI.prototype, "dragBounds", undefined);
|
|
7385
7391
|
__decorate([
|
|
7386
7392
|
dataType(false)
|
|
7387
|
-
], UI.prototype, "editable",
|
|
7393
|
+
], UI.prototype, "editable", undefined);
|
|
7388
7394
|
__decorate([
|
|
7389
7395
|
hitType(true)
|
|
7390
|
-
], UI.prototype, "hittable",
|
|
7396
|
+
], UI.prototype, "hittable", undefined);
|
|
7391
7397
|
__decorate([
|
|
7392
7398
|
hitType('path')
|
|
7393
|
-
], UI.prototype, "hitFill",
|
|
7399
|
+
], UI.prototype, "hitFill", undefined);
|
|
7394
7400
|
__decorate([
|
|
7395
7401
|
strokeType('path')
|
|
7396
|
-
], UI.prototype, "hitStroke",
|
|
7402
|
+
], UI.prototype, "hitStroke", undefined);
|
|
7397
7403
|
__decorate([
|
|
7398
7404
|
hitType(false)
|
|
7399
|
-
], UI.prototype, "hitBox",
|
|
7405
|
+
], UI.prototype, "hitBox", undefined);
|
|
7400
7406
|
__decorate([
|
|
7401
7407
|
hitType(true)
|
|
7402
|
-
], UI.prototype, "hitChildren",
|
|
7408
|
+
], UI.prototype, "hitChildren", undefined);
|
|
7403
7409
|
__decorate([
|
|
7404
7410
|
hitType(true)
|
|
7405
|
-
], UI.prototype, "hitSelf",
|
|
7411
|
+
], UI.prototype, "hitSelf", undefined);
|
|
7406
7412
|
__decorate([
|
|
7407
7413
|
hitType()
|
|
7408
|
-
], UI.prototype, "hitRadius",
|
|
7414
|
+
], UI.prototype, "hitRadius", undefined);
|
|
7409
7415
|
__decorate([
|
|
7410
7416
|
cursorType('')
|
|
7411
|
-
], UI.prototype, "cursor",
|
|
7417
|
+
], UI.prototype, "cursor", undefined);
|
|
7412
7418
|
__decorate([
|
|
7413
7419
|
surfaceType()
|
|
7414
|
-
], UI.prototype, "fill",
|
|
7420
|
+
], UI.prototype, "fill", undefined);
|
|
7415
7421
|
__decorate([
|
|
7416
7422
|
strokeType()
|
|
7417
|
-
], UI.prototype, "stroke",
|
|
7423
|
+
], UI.prototype, "stroke", undefined);
|
|
7418
7424
|
__decorate([
|
|
7419
7425
|
strokeType('inside')
|
|
7420
|
-
], UI.prototype, "strokeAlign",
|
|
7426
|
+
], UI.prototype, "strokeAlign", undefined);
|
|
7421
7427
|
__decorate([
|
|
7422
7428
|
strokeType(1)
|
|
7423
|
-
], UI.prototype, "strokeWidth",
|
|
7429
|
+
], UI.prototype, "strokeWidth", undefined);
|
|
7424
7430
|
__decorate([
|
|
7425
7431
|
strokeType(false)
|
|
7426
|
-
], UI.prototype, "strokeWidthFixed",
|
|
7432
|
+
], UI.prototype, "strokeWidthFixed", undefined);
|
|
7427
7433
|
__decorate([
|
|
7428
7434
|
strokeType('none')
|
|
7429
|
-
], UI.prototype, "strokeCap",
|
|
7435
|
+
], UI.prototype, "strokeCap", undefined);
|
|
7430
7436
|
__decorate([
|
|
7431
7437
|
strokeType('miter')
|
|
7432
|
-
], UI.prototype, "strokeJoin",
|
|
7438
|
+
], UI.prototype, "strokeJoin", undefined);
|
|
7433
7439
|
__decorate([
|
|
7434
7440
|
strokeType()
|
|
7435
|
-
], UI.prototype, "dashPattern",
|
|
7441
|
+
], UI.prototype, "dashPattern", undefined);
|
|
7436
7442
|
__decorate([
|
|
7437
7443
|
strokeType()
|
|
7438
|
-
], UI.prototype, "dashOffset",
|
|
7444
|
+
], UI.prototype, "dashOffset", undefined);
|
|
7439
7445
|
__decorate([
|
|
7440
7446
|
strokeType(10)
|
|
7441
|
-
], UI.prototype, "miterLimit",
|
|
7447
|
+
], UI.prototype, "miterLimit", undefined);
|
|
7442
7448
|
__decorate([
|
|
7443
7449
|
pathType(0)
|
|
7444
|
-
], UI.prototype, "cornerRadius",
|
|
7450
|
+
], UI.prototype, "cornerRadius", undefined);
|
|
7445
7451
|
__decorate([
|
|
7446
7452
|
pathType()
|
|
7447
|
-
], UI.prototype, "cornerSmoothing",
|
|
7453
|
+
], UI.prototype, "cornerSmoothing", undefined);
|
|
7448
7454
|
__decorate([
|
|
7449
7455
|
effectType()
|
|
7450
|
-
], UI.prototype, "shadow",
|
|
7456
|
+
], UI.prototype, "shadow", undefined);
|
|
7451
7457
|
__decorate([
|
|
7452
7458
|
effectType()
|
|
7453
|
-
], UI.prototype, "innerShadow",
|
|
7459
|
+
], UI.prototype, "innerShadow", undefined);
|
|
7454
7460
|
__decorate([
|
|
7455
7461
|
effectType()
|
|
7456
|
-
], UI.prototype, "blur",
|
|
7462
|
+
], UI.prototype, "blur", undefined);
|
|
7457
7463
|
__decorate([
|
|
7458
7464
|
effectType()
|
|
7459
|
-
], UI.prototype, "backgroundBlur",
|
|
7465
|
+
], UI.prototype, "backgroundBlur", undefined);
|
|
7460
7466
|
__decorate([
|
|
7461
7467
|
effectType()
|
|
7462
|
-
], UI.prototype, "grayscale",
|
|
7468
|
+
], UI.prototype, "grayscale", undefined);
|
|
7463
7469
|
__decorate([
|
|
7464
7470
|
dataType({})
|
|
7465
|
-
], UI.prototype, "data",
|
|
7471
|
+
], UI.prototype, "data", undefined);
|
|
7466
7472
|
__decorate([
|
|
7467
7473
|
rewrite(Leaf.prototype.reset)
|
|
7468
7474
|
], UI.prototype, "reset", null);
|
|
@@ -7523,7 +7529,7 @@ let Group = class Group extends UI {
|
|
|
7523
7529
|
};
|
|
7524
7530
|
__decorate([
|
|
7525
7531
|
dataProcessor(GroupData)
|
|
7526
|
-
], Group.prototype, "__",
|
|
7532
|
+
], Group.prototype, "__", undefined);
|
|
7527
7533
|
Group = __decorate([
|
|
7528
7534
|
useModule(Branch),
|
|
7529
7535
|
registerUI()
|
|
@@ -7694,8 +7700,6 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
7694
7700
|
__setAttr(attrName, newValue) {
|
|
7695
7701
|
if (this.canvas) {
|
|
7696
7702
|
if (canvasSizeAttrs.includes(attrName)) {
|
|
7697
|
-
if (!newValue)
|
|
7698
|
-
debug.warn(attrName + ' is 0');
|
|
7699
7703
|
this.__changeCanvasSize(attrName, newValue);
|
|
7700
7704
|
}
|
|
7701
7705
|
else if (attrName === 'fill') {
|
|
@@ -7898,10 +7902,10 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
7898
7902
|
Leafer.list = new LeafList();
|
|
7899
7903
|
__decorate([
|
|
7900
7904
|
dataProcessor(LeaferData)
|
|
7901
|
-
], Leafer.prototype, "__",
|
|
7905
|
+
], Leafer.prototype, "__", undefined);
|
|
7902
7906
|
__decorate([
|
|
7903
7907
|
boundsType()
|
|
7904
|
-
], Leafer.prototype, "pixelRatio",
|
|
7908
|
+
], Leafer.prototype, "pixelRatio", undefined);
|
|
7905
7909
|
Leafer = Leafer_1 = __decorate([
|
|
7906
7910
|
registerUI()
|
|
7907
7911
|
], Leafer);
|
|
@@ -7914,7 +7918,7 @@ let Rect = class Rect extends UI {
|
|
|
7914
7918
|
};
|
|
7915
7919
|
__decorate([
|
|
7916
7920
|
dataProcessor(RectData)
|
|
7917
|
-
], Rect.prototype, "__",
|
|
7921
|
+
], Rect.prototype, "__", undefined);
|
|
7918
7922
|
Rect = __decorate([
|
|
7919
7923
|
useModule(RectRender),
|
|
7920
7924
|
rewriteAble(),
|
|
@@ -7939,6 +7943,8 @@ let Box = class Box extends Group {
|
|
|
7939
7943
|
const data = this.__;
|
|
7940
7944
|
if (this.children.length) {
|
|
7941
7945
|
if (data.__autoSide) {
|
|
7946
|
+
if (data.__hasSurface)
|
|
7947
|
+
this.__extraUpdate();
|
|
7942
7948
|
super.__updateBoxBounds();
|
|
7943
7949
|
const { boxBounds } = this.__layout;
|
|
7944
7950
|
if (!data.__autoSize) {
|
|
@@ -8003,13 +8009,13 @@ let Box = class Box extends Group {
|
|
|
8003
8009
|
};
|
|
8004
8010
|
__decorate([
|
|
8005
8011
|
dataProcessor(BoxData)
|
|
8006
|
-
], Box.prototype, "__",
|
|
8012
|
+
], Box.prototype, "__", undefined);
|
|
8007
8013
|
__decorate([
|
|
8008
8014
|
dataType(false)
|
|
8009
|
-
], Box.prototype, "resizeChildren",
|
|
8015
|
+
], Box.prototype, "resizeChildren", undefined);
|
|
8010
8016
|
__decorate([
|
|
8011
8017
|
affectRenderBoundsType('show')
|
|
8012
|
-
], Box.prototype, "overflow",
|
|
8018
|
+
], Box.prototype, "overflow", undefined);
|
|
8013
8019
|
__decorate([
|
|
8014
8020
|
rewrite(rect.__updateStrokeSpread)
|
|
8015
8021
|
], Box.prototype, "__updateStrokeSpread", null);
|
|
@@ -8048,13 +8054,13 @@ let Frame = class Frame extends Box {
|
|
|
8048
8054
|
};
|
|
8049
8055
|
__decorate([
|
|
8050
8056
|
dataProcessor(FrameData)
|
|
8051
|
-
], Frame.prototype, "__",
|
|
8057
|
+
], Frame.prototype, "__", undefined);
|
|
8052
8058
|
__decorate([
|
|
8053
8059
|
surfaceType('#FFFFFF')
|
|
8054
|
-
], Frame.prototype, "fill",
|
|
8060
|
+
], Frame.prototype, "fill", undefined);
|
|
8055
8061
|
__decorate([
|
|
8056
8062
|
affectRenderBoundsType('hide')
|
|
8057
|
-
], Frame.prototype, "overflow",
|
|
8063
|
+
], Frame.prototype, "overflow", undefined);
|
|
8058
8064
|
Frame = __decorate([
|
|
8059
8065
|
registerUI()
|
|
8060
8066
|
], Frame);
|
|
@@ -8101,16 +8107,16 @@ let Ellipse = class Ellipse extends UI {
|
|
|
8101
8107
|
};
|
|
8102
8108
|
__decorate([
|
|
8103
8109
|
dataProcessor(EllipseData)
|
|
8104
|
-
], Ellipse.prototype, "__",
|
|
8110
|
+
], Ellipse.prototype, "__", undefined);
|
|
8105
8111
|
__decorate([
|
|
8106
8112
|
pathType(0)
|
|
8107
|
-
], Ellipse.prototype, "innerRadius",
|
|
8113
|
+
], Ellipse.prototype, "innerRadius", undefined);
|
|
8108
8114
|
__decorate([
|
|
8109
8115
|
pathType(0)
|
|
8110
|
-
], Ellipse.prototype, "startAngle",
|
|
8116
|
+
], Ellipse.prototype, "startAngle", undefined);
|
|
8111
8117
|
__decorate([
|
|
8112
8118
|
pathType(0)
|
|
8113
|
-
], Ellipse.prototype, "endAngle",
|
|
8119
|
+
], Ellipse.prototype, "endAngle", undefined);
|
|
8114
8120
|
Ellipse = __decorate([
|
|
8115
8121
|
registerUI()
|
|
8116
8122
|
], Ellipse);
|
|
@@ -8169,22 +8175,22 @@ let Line = class Line extends UI {
|
|
|
8169
8175
|
};
|
|
8170
8176
|
__decorate([
|
|
8171
8177
|
dataProcessor(LineData)
|
|
8172
|
-
], Line.prototype, "__",
|
|
8178
|
+
], Line.prototype, "__", undefined);
|
|
8173
8179
|
__decorate([
|
|
8174
8180
|
affectStrokeBoundsType('center')
|
|
8175
|
-
], Line.prototype, "strokeAlign",
|
|
8181
|
+
], Line.prototype, "strokeAlign", undefined);
|
|
8176
8182
|
__decorate([
|
|
8177
8183
|
boundsType(0)
|
|
8178
|
-
], Line.prototype, "height",
|
|
8184
|
+
], Line.prototype, "height", undefined);
|
|
8179
8185
|
__decorate([
|
|
8180
8186
|
pathType()
|
|
8181
|
-
], Line.prototype, "points",
|
|
8187
|
+
], Line.prototype, "points", undefined);
|
|
8182
8188
|
__decorate([
|
|
8183
8189
|
pathType(0)
|
|
8184
|
-
], Line.prototype, "curve",
|
|
8190
|
+
], Line.prototype, "curve", undefined);
|
|
8185
8191
|
__decorate([
|
|
8186
8192
|
pathType(false)
|
|
8187
|
-
], Line.prototype, "closed",
|
|
8193
|
+
], Line.prototype, "closed", undefined);
|
|
8188
8194
|
Line = __decorate([
|
|
8189
8195
|
registerUI()
|
|
8190
8196
|
], Line);
|
|
@@ -8217,16 +8223,16 @@ let Polygon = class Polygon extends UI {
|
|
|
8217
8223
|
};
|
|
8218
8224
|
__decorate([
|
|
8219
8225
|
dataProcessor(PolygonData)
|
|
8220
|
-
], Polygon.prototype, "__",
|
|
8226
|
+
], Polygon.prototype, "__", undefined);
|
|
8221
8227
|
__decorate([
|
|
8222
8228
|
pathType(3)
|
|
8223
|
-
], Polygon.prototype, "sides",
|
|
8229
|
+
], Polygon.prototype, "sides", undefined);
|
|
8224
8230
|
__decorate([
|
|
8225
8231
|
pathType()
|
|
8226
|
-
], Polygon.prototype, "points",
|
|
8232
|
+
], Polygon.prototype, "points", undefined);
|
|
8227
8233
|
__decorate([
|
|
8228
8234
|
pathType(0)
|
|
8229
|
-
], Polygon.prototype, "curve",
|
|
8235
|
+
], Polygon.prototype, "curve", undefined);
|
|
8230
8236
|
__decorate([
|
|
8231
8237
|
rewrite(line.__updateRenderPath)
|
|
8232
8238
|
], Polygon.prototype, "__updateRenderPath", null);
|
|
@@ -8258,13 +8264,13 @@ let Star = class Star extends UI {
|
|
|
8258
8264
|
};
|
|
8259
8265
|
__decorate([
|
|
8260
8266
|
dataProcessor(StarData)
|
|
8261
|
-
], Star.prototype, "__",
|
|
8267
|
+
], Star.prototype, "__", undefined);
|
|
8262
8268
|
__decorate([
|
|
8263
8269
|
pathType(5)
|
|
8264
|
-
], Star.prototype, "corners",
|
|
8270
|
+
], Star.prototype, "corners", undefined);
|
|
8265
8271
|
__decorate([
|
|
8266
8272
|
pathType(0.382)
|
|
8267
|
-
], Star.prototype, "innerRadius",
|
|
8273
|
+
], Star.prototype, "innerRadius", undefined);
|
|
8268
8274
|
Star = __decorate([
|
|
8269
8275
|
registerUI()
|
|
8270
8276
|
], Star);
|
|
@@ -8286,10 +8292,10 @@ let Image = class Image extends Rect {
|
|
|
8286
8292
|
};
|
|
8287
8293
|
__decorate([
|
|
8288
8294
|
dataProcessor(ImageData)
|
|
8289
|
-
], Image.prototype, "__",
|
|
8295
|
+
], Image.prototype, "__", undefined);
|
|
8290
8296
|
__decorate([
|
|
8291
8297
|
boundsType('')
|
|
8292
|
-
], Image.prototype, "url",
|
|
8298
|
+
], Image.prototype, "url", undefined);
|
|
8293
8299
|
Image = __decorate([
|
|
8294
8300
|
registerUI()
|
|
8295
8301
|
], Image);
|
|
@@ -8352,25 +8358,25 @@ let Canvas = class Canvas extends Rect {
|
|
|
8352
8358
|
};
|
|
8353
8359
|
__decorate([
|
|
8354
8360
|
dataProcessor(CanvasData)
|
|
8355
|
-
], Canvas.prototype, "__",
|
|
8361
|
+
], Canvas.prototype, "__", undefined);
|
|
8356
8362
|
__decorate([
|
|
8357
8363
|
resizeType(100)
|
|
8358
|
-
], Canvas.prototype, "width",
|
|
8364
|
+
], Canvas.prototype, "width", undefined);
|
|
8359
8365
|
__decorate([
|
|
8360
8366
|
resizeType(100)
|
|
8361
|
-
], Canvas.prototype, "height",
|
|
8367
|
+
], Canvas.prototype, "height", undefined);
|
|
8362
8368
|
__decorate([
|
|
8363
8369
|
resizeType(1)
|
|
8364
|
-
], Canvas.prototype, "pixelRatio",
|
|
8370
|
+
], Canvas.prototype, "pixelRatio", undefined);
|
|
8365
8371
|
__decorate([
|
|
8366
8372
|
resizeType(true)
|
|
8367
|
-
], Canvas.prototype, "smooth",
|
|
8373
|
+
], Canvas.prototype, "smooth", undefined);
|
|
8368
8374
|
__decorate([
|
|
8369
8375
|
dataType(false)
|
|
8370
|
-
], Canvas.prototype, "safeResize",
|
|
8376
|
+
], Canvas.prototype, "safeResize", undefined);
|
|
8371
8377
|
__decorate([
|
|
8372
8378
|
resizeType()
|
|
8373
|
-
], Canvas.prototype, "contextSettings",
|
|
8379
|
+
], Canvas.prototype, "contextSettings", undefined);
|
|
8374
8380
|
Canvas = __decorate([
|
|
8375
8381
|
registerUI()
|
|
8376
8382
|
], Canvas);
|
|
@@ -8461,76 +8467,76 @@ let Text = class Text extends UI {
|
|
|
8461
8467
|
};
|
|
8462
8468
|
__decorate([
|
|
8463
8469
|
dataProcessor(TextData)
|
|
8464
|
-
], Text.prototype, "__",
|
|
8470
|
+
], Text.prototype, "__", undefined);
|
|
8465
8471
|
__decorate([
|
|
8466
8472
|
boundsType(0)
|
|
8467
|
-
], Text.prototype, "width",
|
|
8473
|
+
], Text.prototype, "width", undefined);
|
|
8468
8474
|
__decorate([
|
|
8469
8475
|
boundsType(0)
|
|
8470
|
-
], Text.prototype, "height",
|
|
8476
|
+
], Text.prototype, "height", undefined);
|
|
8471
8477
|
__decorate([
|
|
8472
8478
|
dataType(false)
|
|
8473
|
-
], Text.prototype, "resizeFontSize",
|
|
8479
|
+
], Text.prototype, "resizeFontSize", undefined);
|
|
8474
8480
|
__decorate([
|
|
8475
8481
|
surfaceType('#000000')
|
|
8476
|
-
], Text.prototype, "fill",
|
|
8482
|
+
], Text.prototype, "fill", undefined);
|
|
8477
8483
|
__decorate([
|
|
8478
8484
|
affectStrokeBoundsType('outside')
|
|
8479
|
-
], Text.prototype, "strokeAlign",
|
|
8485
|
+
], Text.prototype, "strokeAlign", undefined);
|
|
8480
8486
|
__decorate([
|
|
8481
8487
|
hitType('all')
|
|
8482
|
-
], Text.prototype, "hitFill",
|
|
8488
|
+
], Text.prototype, "hitFill", undefined);
|
|
8483
8489
|
__decorate([
|
|
8484
8490
|
boundsType('')
|
|
8485
|
-
], Text.prototype, "text",
|
|
8491
|
+
], Text.prototype, "text", undefined);
|
|
8486
8492
|
__decorate([
|
|
8487
|
-
boundsType('
|
|
8488
|
-
], Text.prototype, "fontFamily",
|
|
8493
|
+
boundsType('caption')
|
|
8494
|
+
], Text.prototype, "fontFamily", undefined);
|
|
8489
8495
|
__decorate([
|
|
8490
8496
|
boundsType(12)
|
|
8491
|
-
], Text.prototype, "fontSize",
|
|
8497
|
+
], Text.prototype, "fontSize", undefined);
|
|
8492
8498
|
__decorate([
|
|
8493
8499
|
boundsType('normal')
|
|
8494
|
-
], Text.prototype, "fontWeight",
|
|
8500
|
+
], Text.prototype, "fontWeight", undefined);
|
|
8495
8501
|
__decorate([
|
|
8496
8502
|
boundsType(false)
|
|
8497
|
-
], Text.prototype, "italic",
|
|
8503
|
+
], Text.prototype, "italic", undefined);
|
|
8498
8504
|
__decorate([
|
|
8499
8505
|
boundsType('none')
|
|
8500
|
-
], Text.prototype, "textCase",
|
|
8506
|
+
], Text.prototype, "textCase", undefined);
|
|
8501
8507
|
__decorate([
|
|
8502
8508
|
boundsType('none')
|
|
8503
|
-
], Text.prototype, "textDecoration",
|
|
8509
|
+
], Text.prototype, "textDecoration", undefined);
|
|
8504
8510
|
__decorate([
|
|
8505
8511
|
boundsType(0)
|
|
8506
|
-
], Text.prototype, "letterSpacing",
|
|
8512
|
+
], Text.prototype, "letterSpacing", undefined);
|
|
8507
8513
|
__decorate([
|
|
8508
8514
|
boundsType({ type: 'percent', value: 1.5 })
|
|
8509
|
-
], Text.prototype, "lineHeight",
|
|
8515
|
+
], Text.prototype, "lineHeight", undefined);
|
|
8510
8516
|
__decorate([
|
|
8511
8517
|
boundsType(0)
|
|
8512
|
-
], Text.prototype, "paraIndent",
|
|
8518
|
+
], Text.prototype, "paraIndent", undefined);
|
|
8513
8519
|
__decorate([
|
|
8514
8520
|
boundsType(0)
|
|
8515
|
-
], Text.prototype, "paraSpacing",
|
|
8521
|
+
], Text.prototype, "paraSpacing", undefined);
|
|
8516
8522
|
__decorate([
|
|
8517
8523
|
boundsType('x')
|
|
8518
|
-
], Text.prototype, "writingMode",
|
|
8524
|
+
], Text.prototype, "writingMode", undefined);
|
|
8519
8525
|
__decorate([
|
|
8520
8526
|
boundsType('left')
|
|
8521
|
-
], Text.prototype, "textAlign",
|
|
8527
|
+
], Text.prototype, "textAlign", undefined);
|
|
8522
8528
|
__decorate([
|
|
8523
8529
|
boundsType('top')
|
|
8524
|
-
], Text.prototype, "verticalAlign",
|
|
8530
|
+
], Text.prototype, "verticalAlign", undefined);
|
|
8525
8531
|
__decorate([
|
|
8526
8532
|
boundsType(true)
|
|
8527
|
-
], Text.prototype, "autoSizeAlign",
|
|
8533
|
+
], Text.prototype, "autoSizeAlign", undefined);
|
|
8528
8534
|
__decorate([
|
|
8529
8535
|
boundsType('normal')
|
|
8530
|
-
], Text.prototype, "textWrap",
|
|
8536
|
+
], Text.prototype, "textWrap", undefined);
|
|
8531
8537
|
__decorate([
|
|
8532
8538
|
boundsType('show')
|
|
8533
|
-
], Text.prototype, "textOverflow",
|
|
8539
|
+
], Text.prototype, "textOverflow", undefined);
|
|
8534
8540
|
Text = __decorate([
|
|
8535
8541
|
registerUI()
|
|
8536
8542
|
], Text);
|
|
@@ -8543,10 +8549,10 @@ let Path = class Path extends UI {
|
|
|
8543
8549
|
};
|
|
8544
8550
|
__decorate([
|
|
8545
8551
|
dataProcessor(PathData)
|
|
8546
|
-
], Path.prototype, "__",
|
|
8552
|
+
], Path.prototype, "__", undefined);
|
|
8547
8553
|
__decorate([
|
|
8548
8554
|
affectStrokeBoundsType('center')
|
|
8549
|
-
], Path.prototype, "strokeAlign",
|
|
8555
|
+
], Path.prototype, "strokeAlign", undefined);
|
|
8550
8556
|
Path = __decorate([
|
|
8551
8557
|
registerUI()
|
|
8552
8558
|
], Path);
|
|
@@ -8585,10 +8591,10 @@ let Pen = class Pen extends Group {
|
|
|
8585
8591
|
};
|
|
8586
8592
|
__decorate([
|
|
8587
8593
|
dataProcessor(PenData)
|
|
8588
|
-
], Pen.prototype, "__",
|
|
8594
|
+
], Pen.prototype, "__", undefined);
|
|
8589
8595
|
__decorate([
|
|
8590
8596
|
penPathType()
|
|
8591
|
-
], Pen.prototype, "path",
|
|
8597
|
+
], Pen.prototype, "path", undefined);
|
|
8592
8598
|
Pen = __decorate([
|
|
8593
8599
|
useModule(PathCreator, ['set', 'path', 'paint']),
|
|
8594
8600
|
registerUI()
|
|
@@ -9222,7 +9228,7 @@ function checkImage(ui, canvas, paint, allowPaint) {
|
|
|
9222
9228
|
}
|
|
9223
9229
|
else {
|
|
9224
9230
|
if (!paint.patternTask) {
|
|
9225
|
-
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this,
|
|
9231
|
+
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, undefined, undefined, function* () {
|
|
9226
9232
|
paint.patternTask = null;
|
|
9227
9233
|
if (canvas.bounds.hit(ui.__nowWorld))
|
|
9228
9234
|
createPattern(ui, paint, pixelRatio);
|
|
@@ -9378,7 +9384,7 @@ function shadow(ui, current, shape) {
|
|
|
9378
9384
|
const end = shadow.length - 1;
|
|
9379
9385
|
toOffsetOutBounds$1(bounds, offsetOutBounds$1);
|
|
9380
9386
|
shadow.forEach((item, index) => {
|
|
9381
|
-
other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, item.color);
|
|
9387
|
+
other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, ColorConvert.string(item.color));
|
|
9382
9388
|
spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0;
|
|
9383
9389
|
drawWorldShadow(other, offsetOutBounds$1, spreadScale, shape);
|
|
9384
9390
|
copyBounds = bounds;
|
|
@@ -9454,7 +9460,7 @@ function innerShadow(ui, current, shape) {
|
|
|
9454
9460
|
other.copyWorld(shape.canvas, shapeBounds, bounds, 'source-out');
|
|
9455
9461
|
copyBounds = bounds;
|
|
9456
9462
|
}
|
|
9457
|
-
other.fillWorld(copyBounds, item.color, 'source-in');
|
|
9463
|
+
other.fillWorld(copyBounds, ColorConvert.string(item.color), 'source-in');
|
|
9458
9464
|
if (ui.__worldFlipped) {
|
|
9459
9465
|
current.copyWorldByReset(other, copyBounds, nowWorld, item.blendMode);
|
|
9460
9466
|
}
|
|
@@ -9812,11 +9818,11 @@ const TextMode = 2;
|
|
|
9812
9818
|
function layoutChar(drawData, style, width, _height) {
|
|
9813
9819
|
const { rows } = drawData;
|
|
9814
9820
|
const { textAlign, paraIndent, letterSpacing } = style;
|
|
9815
|
-
let charX, addWordWidth, indentWidth, mode, wordChar;
|
|
9821
|
+
let charX, addWordWidth, indentWidth, mode, wordChar, wordsLength;
|
|
9816
9822
|
rows.forEach(row => {
|
|
9817
9823
|
if (row.words) {
|
|
9818
|
-
indentWidth = paraIndent && row.paraStart ? paraIndent : 0;
|
|
9819
|
-
addWordWidth = (width && (textAlign === 'justify' || textAlign === 'both') &&
|
|
9824
|
+
indentWidth = paraIndent && row.paraStart ? paraIndent : 0, wordsLength = row.words.length;
|
|
9825
|
+
addWordWidth = (width && (textAlign === 'justify' || textAlign === 'both') && wordsLength > 1) ? (width - row.width - indentWidth) / (wordsLength - 1) : 0;
|
|
9820
9826
|
mode = (letterSpacing || row.isOverflow) ? CharMode : (addWordWidth > 0.01 ? WordMode : TextMode);
|
|
9821
9827
|
if (row.isOverflow && !letterSpacing)
|
|
9822
9828
|
row.textMode = true;
|
|
@@ -9828,7 +9834,7 @@ function layoutChar(drawData, style, width, _height) {
|
|
|
9828
9834
|
row.x += indentWidth;
|
|
9829
9835
|
charX = row.x;
|
|
9830
9836
|
row.data = [];
|
|
9831
|
-
row.words.forEach(word => {
|
|
9837
|
+
row.words.forEach((word, index) => {
|
|
9832
9838
|
if (mode === WordMode) {
|
|
9833
9839
|
wordChar = { char: '', x: charX };
|
|
9834
9840
|
charX = toWordChar(word.data, charX, wordChar);
|
|
@@ -9838,7 +9844,7 @@ function layoutChar(drawData, style, width, _height) {
|
|
|
9838
9844
|
else {
|
|
9839
9845
|
charX = toChar(word.data, charX, row.data, row.isOverflow);
|
|
9840
9846
|
}
|
|
9841
|
-
if (addWordWidth && (!row.paraEnd || textAlign === 'both')) {
|
|
9847
|
+
if (addWordWidth && (!row.paraEnd || textAlign === 'both') && (index !== wordsLength - 1)) {
|
|
9842
9848
|
charX += addWordWidth;
|
|
9843
9849
|
row.width += addWordWidth;
|
|
9844
9850
|
}
|
|
@@ -10090,3 +10096,4 @@ Object.assign(Effect, EffectModule);
|
|
|
10090
10096
|
useCanvas();
|
|
10091
10097
|
|
|
10092
10098
|
export { AlignHelper, Answer, AroundHelper, AutoBounds, BezierHelper, Bounds, BoundsHelper, Box, BoxData, Branch, BranchHelper, BranchRender, Canvas, CanvasData, CanvasManager, ChildEvent, ColorConvert, Creator, DataHelper, Debug, Direction4, Direction9, Effect, Ellipse, EllipseData, EllipseHelper, Event, EventCreator, Eventer, Export, FileHelper, Frame, FrameData, Group, GroupData, Image, ImageData, ImageEvent, ImageManager, IncrementId, 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, MyImage, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, PaintGradient, PaintImage, Path, PathArrow, PathBounds, PathCommandDataHelper, PathCommandMap, PathConvert, PathCorner, PathCreator, PathData, PathDrawer, PathHelper, PathNumberCommandLengthMap, PathNumberCommandMap, Pen, PenData, Platform, Plugin, Point, PointHelper, Polygon, PolygonData, PropertyEvent, Rect, RectData, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, Run, Star, StarData, State, StringNumberMap, TaskItem, TaskProcessor, Text, TextConvert, TextData, Transition, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIData, UIRender, UnitConvert, WaitHelper, WatchEvent, Watcher, 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 };
|
|
10099
|
+
//# sourceMappingURL=worker.module.js.map
|