@leafer/core 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/lib/core.cjs +43 -40
- package/lib/core.esm.js +43 -40
- package/lib/core.esm.min.js +1 -1
- package/lib/core.min.cjs +1 -1
- package/package.json +17 -17
- package/src/index.ts +1 -1
- package/types/index.d.ts +1 -1
package/lib/core.cjs
CHANGED
|
@@ -1535,10 +1535,10 @@ const DataHelper = {
|
|
|
1535
1535
|
Object.keys(merge).forEach(key => {
|
|
1536
1536
|
var _a, _b;
|
|
1537
1537
|
value = merge[key];
|
|
1538
|
-
if ((value === null || value ===
|
|
1538
|
+
if ((value === null || value === undefined ? undefined : value.constructor) === Object && ((_a = t[key]) === null || _a === undefined ? undefined : _a.constructor) === Object)
|
|
1539
1539
|
return assign(t[key], merge[key], exclude && exclude[key]);
|
|
1540
1540
|
if (exclude && (key in exclude)) {
|
|
1541
|
-
if (((_b = exclude[key]) === null || _b ===
|
|
1541
|
+
if (((_b = exclude[key]) === null || _b === undefined ? undefined : _b.constructor) === Object)
|
|
1542
1542
|
assign(t[key] = {}, merge[key], exclude[key]);
|
|
1543
1543
|
return;
|
|
1544
1544
|
}
|
|
@@ -1707,7 +1707,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
1707
1707
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1708
1708
|
PERFORMANCE OF THIS SOFTWARE.
|
|
1709
1709
|
***************************************************************************** */
|
|
1710
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
1710
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
1711
1711
|
|
|
1712
1712
|
|
|
1713
1713
|
function __decorate(decorators, target, key, desc) {
|
|
@@ -1775,7 +1775,7 @@ class Canvas {
|
|
|
1775
1775
|
}
|
|
1776
1776
|
setTransform(_a, _b, _c, _d, _e, _f) { }
|
|
1777
1777
|
resetTransform() { }
|
|
1778
|
-
getTransform() { return
|
|
1778
|
+
getTransform() { return undefined; }
|
|
1779
1779
|
save() { }
|
|
1780
1780
|
restore() { }
|
|
1781
1781
|
transform(a, b, c, d, e, f) {
|
|
@@ -1832,12 +1832,12 @@ class Canvas {
|
|
|
1832
1832
|
ellipse(_x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise) { }
|
|
1833
1833
|
rect(_x, _y, _width, _height) { }
|
|
1834
1834
|
roundRect(_x, _y, _width, _height, _radius) { }
|
|
1835
|
-
createConicGradient(_startAngle, _x, _y) { return
|
|
1836
|
-
createLinearGradient(_x0, _y0, _x1, _y1) { return
|
|
1837
|
-
createPattern(_image, _repetition) { return
|
|
1838
|
-
createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return
|
|
1835
|
+
createConicGradient(_startAngle, _x, _y) { return undefined; }
|
|
1836
|
+
createLinearGradient(_x0, _y0, _x1, _y1) { return undefined; }
|
|
1837
|
+
createPattern(_image, _repetition) { return undefined; }
|
|
1838
|
+
createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return undefined; }
|
|
1839
1839
|
fillText(_text, _x, _y, _maxWidth) { }
|
|
1840
|
-
measureText(_text) { return
|
|
1840
|
+
measureText(_text) { return undefined; }
|
|
1841
1841
|
strokeText(_text, _x, _y, _maxWidth) { }
|
|
1842
1842
|
destroy() {
|
|
1843
1843
|
this.context = null;
|
|
@@ -1845,79 +1845,79 @@ class Canvas {
|
|
|
1845
1845
|
}
|
|
1846
1846
|
__decorate([
|
|
1847
1847
|
contextAttr('imageSmoothingEnabled')
|
|
1848
|
-
], Canvas.prototype, "smooth",
|
|
1848
|
+
], Canvas.prototype, "smooth", undefined);
|
|
1849
1849
|
__decorate([
|
|
1850
1850
|
contextAttr('imageSmoothingQuality')
|
|
1851
|
-
], Canvas.prototype, "smoothLevel",
|
|
1851
|
+
], Canvas.prototype, "smoothLevel", undefined);
|
|
1852
1852
|
__decorate([
|
|
1853
1853
|
contextAttr('globalAlpha')
|
|
1854
|
-
], Canvas.prototype, "opacity",
|
|
1854
|
+
], Canvas.prototype, "opacity", undefined);
|
|
1855
1855
|
__decorate([
|
|
1856
1856
|
contextAttr()
|
|
1857
|
-
], Canvas.prototype, "fillStyle",
|
|
1857
|
+
], Canvas.prototype, "fillStyle", undefined);
|
|
1858
1858
|
__decorate([
|
|
1859
1859
|
contextAttr()
|
|
1860
|
-
], Canvas.prototype, "strokeStyle",
|
|
1860
|
+
], Canvas.prototype, "strokeStyle", undefined);
|
|
1861
1861
|
__decorate([
|
|
1862
1862
|
contextAttr('lineWidth')
|
|
1863
|
-
], Canvas.prototype, "strokeWidth",
|
|
1863
|
+
], Canvas.prototype, "strokeWidth", undefined);
|
|
1864
1864
|
__decorate([
|
|
1865
1865
|
contextAttr('lineCap')
|
|
1866
|
-
], Canvas.prototype, "strokeCap",
|
|
1866
|
+
], Canvas.prototype, "strokeCap", undefined);
|
|
1867
1867
|
__decorate([
|
|
1868
1868
|
contextAttr('lineJoin')
|
|
1869
|
-
], Canvas.prototype, "strokeJoin",
|
|
1869
|
+
], Canvas.prototype, "strokeJoin", undefined);
|
|
1870
1870
|
__decorate([
|
|
1871
1871
|
contextAttr('lineDashOffset')
|
|
1872
|
-
], Canvas.prototype, "dashOffset",
|
|
1872
|
+
], Canvas.prototype, "dashOffset", undefined);
|
|
1873
1873
|
__decorate([
|
|
1874
1874
|
contextAttr()
|
|
1875
|
-
], Canvas.prototype, "miterLimit",
|
|
1875
|
+
], Canvas.prototype, "miterLimit", undefined);
|
|
1876
1876
|
__decorate([
|
|
1877
1877
|
contextAttr()
|
|
1878
|
-
], Canvas.prototype, "shadowBlur",
|
|
1878
|
+
], Canvas.prototype, "shadowBlur", undefined);
|
|
1879
1879
|
__decorate([
|
|
1880
1880
|
contextAttr()
|
|
1881
|
-
], Canvas.prototype, "shadowColor",
|
|
1881
|
+
], Canvas.prototype, "shadowColor", undefined);
|
|
1882
1882
|
__decorate([
|
|
1883
1883
|
contextAttr()
|
|
1884
|
-
], Canvas.prototype, "shadowOffsetX",
|
|
1884
|
+
], Canvas.prototype, "shadowOffsetX", undefined);
|
|
1885
1885
|
__decorate([
|
|
1886
1886
|
contextAttr()
|
|
1887
|
-
], Canvas.prototype, "shadowOffsetY",
|
|
1887
|
+
], Canvas.prototype, "shadowOffsetY", undefined);
|
|
1888
1888
|
__decorate([
|
|
1889
1889
|
contextAttr()
|
|
1890
|
-
], Canvas.prototype, "filter",
|
|
1890
|
+
], Canvas.prototype, "filter", undefined);
|
|
1891
1891
|
__decorate([
|
|
1892
1892
|
contextAttr()
|
|
1893
|
-
], Canvas.prototype, "font",
|
|
1893
|
+
], Canvas.prototype, "font", undefined);
|
|
1894
1894
|
__decorate([
|
|
1895
1895
|
contextAttr()
|
|
1896
|
-
], Canvas.prototype, "fontKerning",
|
|
1896
|
+
], Canvas.prototype, "fontKerning", undefined);
|
|
1897
1897
|
__decorate([
|
|
1898
1898
|
contextAttr()
|
|
1899
|
-
], Canvas.prototype, "fontStretch",
|
|
1899
|
+
], Canvas.prototype, "fontStretch", undefined);
|
|
1900
1900
|
__decorate([
|
|
1901
1901
|
contextAttr()
|
|
1902
|
-
], Canvas.prototype, "fontVariantCaps",
|
|
1902
|
+
], Canvas.prototype, "fontVariantCaps", undefined);
|
|
1903
1903
|
__decorate([
|
|
1904
1904
|
contextAttr()
|
|
1905
|
-
], Canvas.prototype, "textAlign",
|
|
1905
|
+
], Canvas.prototype, "textAlign", undefined);
|
|
1906
1906
|
__decorate([
|
|
1907
1907
|
contextAttr()
|
|
1908
|
-
], Canvas.prototype, "textBaseline",
|
|
1908
|
+
], Canvas.prototype, "textBaseline", undefined);
|
|
1909
1909
|
__decorate([
|
|
1910
1910
|
contextAttr()
|
|
1911
|
-
], Canvas.prototype, "textRendering",
|
|
1911
|
+
], Canvas.prototype, "textRendering", undefined);
|
|
1912
1912
|
__decorate([
|
|
1913
1913
|
contextAttr()
|
|
1914
|
-
], Canvas.prototype, "wordSpacing",
|
|
1914
|
+
], Canvas.prototype, "wordSpacing", undefined);
|
|
1915
1915
|
__decorate([
|
|
1916
1916
|
contextAttr()
|
|
1917
|
-
], Canvas.prototype, "letterSpacing",
|
|
1917
|
+
], Canvas.prototype, "letterSpacing", undefined);
|
|
1918
1918
|
__decorate([
|
|
1919
1919
|
contextAttr()
|
|
1920
|
-
], Canvas.prototype, "direction",
|
|
1920
|
+
], Canvas.prototype, "direction", undefined);
|
|
1921
1921
|
__decorate([
|
|
1922
1922
|
contextMethod()
|
|
1923
1923
|
], Canvas.prototype, "setTransform", null);
|
|
@@ -3386,7 +3386,7 @@ class TaskItem {
|
|
|
3386
3386
|
this.task = task;
|
|
3387
3387
|
}
|
|
3388
3388
|
run() {
|
|
3389
|
-
return __awaiter(this,
|
|
3389
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
3390
3390
|
try {
|
|
3391
3391
|
if (this.task && !this.isComplete && this.parent.running)
|
|
3392
3392
|
yield this.task();
|
|
@@ -3698,7 +3698,7 @@ class LeaferImage {
|
|
|
3698
3698
|
load(onSuccess, onError) {
|
|
3699
3699
|
if (!this.loading) {
|
|
3700
3700
|
this.loading = true;
|
|
3701
|
-
ImageManager.tasker.add(() => __awaiter(this,
|
|
3701
|
+
ImageManager.tasker.add(() => __awaiter(this, undefined, undefined, function* () {
|
|
3702
3702
|
return yield Platform.origin.loadImage(this.url).then((img) => {
|
|
3703
3703
|
this.ready = true;
|
|
3704
3704
|
this.width = img.naturalWidth || img.width;
|
|
@@ -5177,8 +5177,7 @@ const LeafBounds = {
|
|
|
5177
5177
|
__updateAutoLayout() {
|
|
5178
5178
|
this.__layout.matrixChanged = true;
|
|
5179
5179
|
if (this.isBranch) {
|
|
5180
|
-
|
|
5181
|
-
this.leafer.layouter.addExtra(this);
|
|
5180
|
+
this.__extraUpdate();
|
|
5182
5181
|
if (this.__.flow) {
|
|
5183
5182
|
if (this.__layout.boxChanged)
|
|
5184
5183
|
this.__updateFlowLayout();
|
|
@@ -5331,7 +5330,7 @@ exports.Leaf = class Leaf {
|
|
|
5331
5330
|
get __worldFlipped() { return this.__world.scaleX < 0 || this.__world.scaleY < 0; }
|
|
5332
5331
|
get __onlyHitMask() { return this.__hasMask && !this.__.hitChildren; }
|
|
5333
5332
|
get __ignoreHitWorld() { return (this.__hasMask || this.__hasEraser) && this.__.hitChildren; }
|
|
5334
|
-
get __inLazyBounds() {
|
|
5333
|
+
get __inLazyBounds() { return this.leaferIsCreated && this.leafer.lazyBounds.hit(this.__world); }
|
|
5335
5334
|
get pathInputed() { return this.__.__pathInputed; }
|
|
5336
5335
|
set event(map) { this.on(map); }
|
|
5337
5336
|
constructor(data) {
|
|
@@ -5442,6 +5441,10 @@ exports.Leaf = class Leaf {
|
|
|
5442
5441
|
forceRender(_bounds, _sync) {
|
|
5443
5442
|
this.forceUpdate('surface');
|
|
5444
5443
|
}
|
|
5444
|
+
__extraUpdate() {
|
|
5445
|
+
if (this.leaferIsReady)
|
|
5446
|
+
this.leafer.layouter.addExtra(this);
|
|
5447
|
+
}
|
|
5445
5448
|
__updateWorldMatrix() { }
|
|
5446
5449
|
__updateLocalMatrix() { }
|
|
5447
5450
|
__updateWorldBounds() { }
|
|
@@ -6009,7 +6012,7 @@ class LeafLevelList {
|
|
|
6009
6012
|
}
|
|
6010
6013
|
}
|
|
6011
6014
|
|
|
6012
|
-
const version = "1.3.
|
|
6015
|
+
const version = "1.3.3";
|
|
6013
6016
|
|
|
6014
6017
|
exports.AlignHelper = AlignHelper;
|
|
6015
6018
|
exports.AroundHelper = AroundHelper;
|
package/lib/core.esm.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 @@ 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 @@ 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 @@ class Canvas {
|
|
|
1843
1843
|
}
|
|
1844
1844
|
__decorate([
|
|
1845
1845
|
contextAttr('imageSmoothingEnabled')
|
|
1846
|
-
], Canvas.prototype, "smooth",
|
|
1846
|
+
], Canvas.prototype, "smooth", undefined);
|
|
1847
1847
|
__decorate([
|
|
1848
1848
|
contextAttr('imageSmoothingQuality')
|
|
1849
|
-
], Canvas.prototype, "smoothLevel",
|
|
1849
|
+
], Canvas.prototype, "smoothLevel", undefined);
|
|
1850
1850
|
__decorate([
|
|
1851
1851
|
contextAttr('globalAlpha')
|
|
1852
|
-
], Canvas.prototype, "opacity",
|
|
1852
|
+
], Canvas.prototype, "opacity", undefined);
|
|
1853
1853
|
__decorate([
|
|
1854
1854
|
contextAttr()
|
|
1855
|
-
], Canvas.prototype, "fillStyle",
|
|
1855
|
+
], Canvas.prototype, "fillStyle", undefined);
|
|
1856
1856
|
__decorate([
|
|
1857
1857
|
contextAttr()
|
|
1858
|
-
], Canvas.prototype, "strokeStyle",
|
|
1858
|
+
], Canvas.prototype, "strokeStyle", undefined);
|
|
1859
1859
|
__decorate([
|
|
1860
1860
|
contextAttr('lineWidth')
|
|
1861
|
-
], Canvas.prototype, "strokeWidth",
|
|
1861
|
+
], Canvas.prototype, "strokeWidth", undefined);
|
|
1862
1862
|
__decorate([
|
|
1863
1863
|
contextAttr('lineCap')
|
|
1864
|
-
], Canvas.prototype, "strokeCap",
|
|
1864
|
+
], Canvas.prototype, "strokeCap", undefined);
|
|
1865
1865
|
__decorate([
|
|
1866
1866
|
contextAttr('lineJoin')
|
|
1867
|
-
], Canvas.prototype, "strokeJoin",
|
|
1867
|
+
], Canvas.prototype, "strokeJoin", undefined);
|
|
1868
1868
|
__decorate([
|
|
1869
1869
|
contextAttr('lineDashOffset')
|
|
1870
|
-
], Canvas.prototype, "dashOffset",
|
|
1870
|
+
], Canvas.prototype, "dashOffset", undefined);
|
|
1871
1871
|
__decorate([
|
|
1872
1872
|
contextAttr()
|
|
1873
|
-
], Canvas.prototype, "miterLimit",
|
|
1873
|
+
], Canvas.prototype, "miterLimit", undefined);
|
|
1874
1874
|
__decorate([
|
|
1875
1875
|
contextAttr()
|
|
1876
|
-
], Canvas.prototype, "shadowBlur",
|
|
1876
|
+
], Canvas.prototype, "shadowBlur", undefined);
|
|
1877
1877
|
__decorate([
|
|
1878
1878
|
contextAttr()
|
|
1879
|
-
], Canvas.prototype, "shadowColor",
|
|
1879
|
+
], Canvas.prototype, "shadowColor", undefined);
|
|
1880
1880
|
__decorate([
|
|
1881
1881
|
contextAttr()
|
|
1882
|
-
], Canvas.prototype, "shadowOffsetX",
|
|
1882
|
+
], Canvas.prototype, "shadowOffsetX", undefined);
|
|
1883
1883
|
__decorate([
|
|
1884
1884
|
contextAttr()
|
|
1885
|
-
], Canvas.prototype, "shadowOffsetY",
|
|
1885
|
+
], Canvas.prototype, "shadowOffsetY", undefined);
|
|
1886
1886
|
__decorate([
|
|
1887
1887
|
contextAttr()
|
|
1888
|
-
], Canvas.prototype, "filter",
|
|
1888
|
+
], Canvas.prototype, "filter", undefined);
|
|
1889
1889
|
__decorate([
|
|
1890
1890
|
contextAttr()
|
|
1891
|
-
], Canvas.prototype, "font",
|
|
1891
|
+
], Canvas.prototype, "font", undefined);
|
|
1892
1892
|
__decorate([
|
|
1893
1893
|
contextAttr()
|
|
1894
|
-
], Canvas.prototype, "fontKerning",
|
|
1894
|
+
], Canvas.prototype, "fontKerning", undefined);
|
|
1895
1895
|
__decorate([
|
|
1896
1896
|
contextAttr()
|
|
1897
|
-
], Canvas.prototype, "fontStretch",
|
|
1897
|
+
], Canvas.prototype, "fontStretch", undefined);
|
|
1898
1898
|
__decorate([
|
|
1899
1899
|
contextAttr()
|
|
1900
|
-
], Canvas.prototype, "fontVariantCaps",
|
|
1900
|
+
], Canvas.prototype, "fontVariantCaps", undefined);
|
|
1901
1901
|
__decorate([
|
|
1902
1902
|
contextAttr()
|
|
1903
|
-
], Canvas.prototype, "textAlign",
|
|
1903
|
+
], Canvas.prototype, "textAlign", undefined);
|
|
1904
1904
|
__decorate([
|
|
1905
1905
|
contextAttr()
|
|
1906
|
-
], Canvas.prototype, "textBaseline",
|
|
1906
|
+
], Canvas.prototype, "textBaseline", undefined);
|
|
1907
1907
|
__decorate([
|
|
1908
1908
|
contextAttr()
|
|
1909
|
-
], Canvas.prototype, "textRendering",
|
|
1909
|
+
], Canvas.prototype, "textRendering", undefined);
|
|
1910
1910
|
__decorate([
|
|
1911
1911
|
contextAttr()
|
|
1912
|
-
], Canvas.prototype, "wordSpacing",
|
|
1912
|
+
], Canvas.prototype, "wordSpacing", undefined);
|
|
1913
1913
|
__decorate([
|
|
1914
1914
|
contextAttr()
|
|
1915
|
-
], Canvas.prototype, "letterSpacing",
|
|
1915
|
+
], Canvas.prototype, "letterSpacing", undefined);
|
|
1916
1916
|
__decorate([
|
|
1917
1917
|
contextAttr()
|
|
1918
|
-
], Canvas.prototype, "direction",
|
|
1918
|
+
], Canvas.prototype, "direction", undefined);
|
|
1919
1919
|
__decorate([
|
|
1920
1920
|
contextMethod()
|
|
1921
1921
|
], Canvas.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,6 +6010,6 @@ class LeafLevelList {
|
|
|
6007
6010
|
}
|
|
6008
6011
|
}
|
|
6009
6012
|
|
|
6010
|
-
const version = "1.3.
|
|
6013
|
+
const version = "1.3.3";
|
|
6011
6014
|
|
|
6012
6015
|
export { AlignHelper, Answer, AroundHelper, AutoBounds, BezierHelper, Bounds, BoundsHelper, Branch, BranchHelper, BranchRender, CanvasManager, ChildEvent, Creator, DataHelper, Debug, Direction4, Direction9, EllipseHelper, Event, EventCreator, Eventer, FileHelper, ImageEvent, ImageManager, IncrementId, LayoutEvent, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, LeaferCanvasBase, LeaferEvent, LeaferImage, MathHelper, Matrix, MatrixHelper, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, PathBounds, PathCommandDataHelper, PathCommandMap, PathConvert, PathCorner, PathCreator, PathDrawer, PathHelper, PathNumberCommandLengthMap, PathNumberCommandMap, Platform, Plugin, Point, PointHelper, PropertyEvent, RectHelper, RenderEvent, ResizeEvent, Run, StringNumberMap, TaskItem, TaskProcessor, TwoPointBoundsHelper, UICreator, WaitHelper, WatchEvent, affectRenderBoundsType, affectStrokeBoundsType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, doBoundsType, doStrokeType, emptyData, eraserType, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isNull, layoutProcessor, maskType, naturalBoundsType, opacityType, pathInputType, pathType, pen, positionType, registerUI, registerUIEvent, rewrite, rewriteAble, rotationType, scaleType, sortType, strokeType, surfaceType, tempBounds, tempMatrix, tempPoint$2 as tempPoint, useModule, version, visibleType };
|