@leafer-ui/miniapp 1.0.0-rc.4 → 1.0.0-rc.5
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/miniapp.esm.js +35 -15
- package/dist/miniapp.esm.min.js +1 -1
- package/dist/miniapp.module.js +193 -158
- package/dist/miniapp.module.min.js +1 -1
- package/package.json +6 -6
package/dist/miniapp.module.js
CHANGED
|
@@ -647,14 +647,14 @@ const BoundsHelper = {
|
|
|
647
647
|
},
|
|
648
648
|
getFitMatrix(t, put) {
|
|
649
649
|
const scale = Math.min(1, Math.min(t.width / put.width, t.height / put.height));
|
|
650
|
-
return new Matrix(scale, 0, 0, scale, -
|
|
650
|
+
return new Matrix(scale, 0, 0, scale, -put.x * scale, -put.y * scale);
|
|
651
651
|
},
|
|
652
652
|
getSpread(t, spreadX, spreadY) {
|
|
653
653
|
const n = {};
|
|
654
654
|
B.copyAndSpread(n, t, spreadX, spreadY);
|
|
655
655
|
return n;
|
|
656
656
|
},
|
|
657
|
-
spread(t, spreadX, spreadY) {
|
|
657
|
+
spread(t, spreadX, spreadY = spreadX) {
|
|
658
658
|
B.copyAndSpread(t, t, spreadX, spreadY);
|
|
659
659
|
},
|
|
660
660
|
ceil(t) {
|
|
@@ -795,8 +795,8 @@ class Bounds {
|
|
|
795
795
|
getFitMatrix(put) {
|
|
796
796
|
return BoundsHelper.getFitMatrix(this, put);
|
|
797
797
|
}
|
|
798
|
-
spread(
|
|
799
|
-
BoundsHelper.spread(this,
|
|
798
|
+
spread(spreadX, spreadY) {
|
|
799
|
+
BoundsHelper.spread(this, spreadX, spreadY);
|
|
800
800
|
return this;
|
|
801
801
|
}
|
|
802
802
|
ceil() {
|
|
@@ -1378,6 +1378,8 @@ class LeafData {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
|
|
1380
1380
|
const FileHelper = {
|
|
1381
|
+
opacityTypes: ['png', 'webp', 'svg'],
|
|
1382
|
+
upperCaseTypeMap: {},
|
|
1381
1383
|
mineType(type) {
|
|
1382
1384
|
if (!type || type.startsWith('image'))
|
|
1383
1385
|
return type;
|
|
@@ -1390,6 +1392,7 @@ const FileHelper = {
|
|
|
1390
1392
|
return l[l.length - 1];
|
|
1391
1393
|
}
|
|
1392
1394
|
};
|
|
1395
|
+
FileHelper.opacityTypes.forEach(type => FileHelper.upperCaseTypeMap[type] = type.toUpperCase());
|
|
1393
1396
|
|
|
1394
1397
|
/******************************************************************************
|
|
1395
1398
|
Copyright (c) Microsoft Corporation.
|
|
@@ -2330,7 +2333,7 @@ const EllipseHelper = {
|
|
|
2330
2333
|
const centerX = fromX + halfX + rotationCos * cx - rotationSin * cy;
|
|
2331
2334
|
const centerY = fromY + halfY + rotationSin * cx + rotationCos * cy;
|
|
2332
2335
|
const anticlockwise = totalRadian < 0 ? 1 : 0;
|
|
2333
|
-
if (curveMode) {
|
|
2336
|
+
if (curveMode || Platform.name === 'node') {
|
|
2334
2337
|
ellipse$5(data, centerX, centerY, radiusX, radiusY, rotation, startRadian / OneRadian, endRadian / OneRadian, anticlockwise);
|
|
2335
2338
|
}
|
|
2336
2339
|
else {
|
|
@@ -3257,6 +3260,23 @@ const ImageManager = {
|
|
|
3257
3260
|
list.length = 0;
|
|
3258
3261
|
}
|
|
3259
3262
|
},
|
|
3263
|
+
isPixel(config) {
|
|
3264
|
+
return FileHelper.opacityTypes.some(item => I$1.isFormat(item, config));
|
|
3265
|
+
},
|
|
3266
|
+
isFormat(format, config) {
|
|
3267
|
+
if (config.format === format)
|
|
3268
|
+
return true;
|
|
3269
|
+
const { url } = config;
|
|
3270
|
+
if (url.startsWith('data:')) {
|
|
3271
|
+
if (url.startsWith('data:' + FileHelper.mineType(format)))
|
|
3272
|
+
return true;
|
|
3273
|
+
}
|
|
3274
|
+
else {
|
|
3275
|
+
if (url.includes('.' + format) || url.includes('.' + FileHelper.upperCaseTypeMap[format]))
|
|
3276
|
+
return true;
|
|
3277
|
+
}
|
|
3278
|
+
return false;
|
|
3279
|
+
},
|
|
3260
3280
|
destroy() {
|
|
3261
3281
|
I$1.map = {};
|
|
3262
3282
|
}
|
|
@@ -3272,17 +3292,7 @@ class LeaferImage {
|
|
|
3272
3292
|
this.waitComplete = [];
|
|
3273
3293
|
this.innerId = create$1(IMAGE);
|
|
3274
3294
|
this.config = config || { url: '' };
|
|
3275
|
-
|
|
3276
|
-
if (url.startsWith('data:')) {
|
|
3277
|
-
if (url.startsWith('data:image/svg'))
|
|
3278
|
-
this.isSVG = true;
|
|
3279
|
-
}
|
|
3280
|
-
else {
|
|
3281
|
-
if (url.includes('.svg'))
|
|
3282
|
-
this.isSVG = true;
|
|
3283
|
-
}
|
|
3284
|
-
if (this.config.format === 'svg')
|
|
3285
|
-
this.isSVG = true;
|
|
3295
|
+
this.isSVG = ImageManager.isFormat('svg', config);
|
|
3286
3296
|
}
|
|
3287
3297
|
load(onSuccess, onError) {
|
|
3288
3298
|
if (!this.loading) {
|
|
@@ -3355,13 +3365,19 @@ class Event {
|
|
|
3355
3365
|
}
|
|
3356
3366
|
stopDefault() {
|
|
3357
3367
|
this.isStopDefault = true;
|
|
3368
|
+
if (this.origin)
|
|
3369
|
+
Platform.event.stopDefault(this.origin);
|
|
3358
3370
|
}
|
|
3359
3371
|
stopNow() {
|
|
3360
3372
|
this.isStopNow = true;
|
|
3361
3373
|
this.isStop = true;
|
|
3374
|
+
if (this.origin)
|
|
3375
|
+
Platform.event.stopNow(this.origin);
|
|
3362
3376
|
}
|
|
3363
3377
|
stop() {
|
|
3364
3378
|
this.isStop = true;
|
|
3379
|
+
if (this.origin)
|
|
3380
|
+
Platform.event.stop(this.origin);
|
|
3365
3381
|
}
|
|
3366
3382
|
}
|
|
3367
3383
|
|
|
@@ -3423,20 +3439,6 @@ class ResizeEvent extends Event {
|
|
|
3423
3439
|
}
|
|
3424
3440
|
ResizeEvent.RESIZE = 'resize';
|
|
3425
3441
|
|
|
3426
|
-
class TransformEvent extends Event {
|
|
3427
|
-
constructor(type, params) {
|
|
3428
|
-
super(type);
|
|
3429
|
-
if (params)
|
|
3430
|
-
Object.assign(this, params);
|
|
3431
|
-
}
|
|
3432
|
-
}
|
|
3433
|
-
TransformEvent.START = 'transform.start';
|
|
3434
|
-
TransformEvent.CHANGE = 'transform.change';
|
|
3435
|
-
TransformEvent.END = 'transform.end';
|
|
3436
|
-
TransformEvent.BEFORE_START = 'transform.before_start';
|
|
3437
|
-
TransformEvent.BEFORE_CHANGE = 'transform.before_change';
|
|
3438
|
-
TransformEvent.BEFORE_END = 'transform.before_end';
|
|
3439
|
-
|
|
3440
3442
|
class WatchEvent extends Event {
|
|
3441
3443
|
constructor(type, data) {
|
|
3442
3444
|
super(type);
|
|
@@ -3537,15 +3539,15 @@ class UIEvent extends Event {
|
|
|
3537
3539
|
this.bubbles = true;
|
|
3538
3540
|
Object.assign(this, params);
|
|
3539
3541
|
}
|
|
3540
|
-
getInner(
|
|
3541
|
-
if (!
|
|
3542
|
-
|
|
3543
|
-
return
|
|
3542
|
+
getInner(relative) {
|
|
3543
|
+
if (!relative)
|
|
3544
|
+
relative = this.current;
|
|
3545
|
+
return relative.getInnerPoint(this);
|
|
3544
3546
|
}
|
|
3545
|
-
getLocal(
|
|
3546
|
-
if (!
|
|
3547
|
-
|
|
3548
|
-
return
|
|
3547
|
+
getLocal(relative) {
|
|
3548
|
+
if (!relative)
|
|
3549
|
+
relative = this.current;
|
|
3550
|
+
return relative.getLocalPoint(this);
|
|
3549
3551
|
}
|
|
3550
3552
|
static changeName(oldName, newName) {
|
|
3551
3553
|
EventCreator.changeName(oldName, newName);
|
|
@@ -3592,7 +3594,7 @@ function positionType(defaultValue) {
|
|
|
3592
3594
|
defineLeafAttr(target, key, defaultValue, {
|
|
3593
3595
|
set(value) {
|
|
3594
3596
|
this.__setAttr(key, value);
|
|
3595
|
-
this.__layout.
|
|
3597
|
+
this.__layout.matrixChanged || this.__layout.matrixChange();
|
|
3596
3598
|
}
|
|
3597
3599
|
});
|
|
3598
3600
|
};
|
|
@@ -3624,7 +3626,7 @@ function boundsType(defaultValue) {
|
|
|
3624
3626
|
this.__setAttr(key, value);
|
|
3625
3627
|
this.__layout.boxChanged || this.__layout.boxChange();
|
|
3626
3628
|
if (this.__.around)
|
|
3627
|
-
this.__layout.
|
|
3629
|
+
this.__layout.matrixChanged || this.__layout.matrixChange();
|
|
3628
3630
|
}
|
|
3629
3631
|
});
|
|
3630
3632
|
};
|
|
@@ -3860,29 +3862,36 @@ PointerEvent.CLICK = 'click';
|
|
|
3860
3862
|
PointerEvent.DOUBLE_CLICK = 'double_click';
|
|
3861
3863
|
PointerEvent.LONG_PRESS = 'long_press';
|
|
3862
3864
|
PointerEvent.LONG_TAP = 'long_tap';
|
|
3865
|
+
PointerEvent.MENU = 'pointer.menu';
|
|
3863
3866
|
PointerEvent = __decorate([
|
|
3864
3867
|
registerUIEvent()
|
|
3865
3868
|
], PointerEvent);
|
|
3866
3869
|
|
|
3867
3870
|
const move = {};
|
|
3868
3871
|
let DragEvent = class DragEvent extends PointerEvent {
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
+
static setList(data) {
|
|
3873
|
+
this.list = data instanceof LeafList ? data : new LeafList(data);
|
|
3874
|
+
}
|
|
3875
|
+
static setData(data) {
|
|
3876
|
+
this.data = data;
|
|
3877
|
+
}
|
|
3878
|
+
getInnerMove(relative, total) {
|
|
3879
|
+
if (!relative)
|
|
3880
|
+
relative = this.current;
|
|
3872
3881
|
this.assignMove(total);
|
|
3873
|
-
return
|
|
3882
|
+
return relative.getInnerPoint(move, null, true);
|
|
3874
3883
|
}
|
|
3875
|
-
getLocalMove(
|
|
3876
|
-
if (!
|
|
3877
|
-
|
|
3884
|
+
getLocalMove(relative, total) {
|
|
3885
|
+
if (!relative)
|
|
3886
|
+
relative = this.current;
|
|
3878
3887
|
this.assignMove(total);
|
|
3879
|
-
return
|
|
3888
|
+
return relative.getLocalPoint(move, null, true);
|
|
3880
3889
|
}
|
|
3881
|
-
getInnerTotal(
|
|
3882
|
-
return this.getInnerMove(
|
|
3890
|
+
getInnerTotal(relative) {
|
|
3891
|
+
return this.getInnerMove(relative, true);
|
|
3883
3892
|
}
|
|
3884
|
-
getLocalTotal(
|
|
3885
|
-
return this.getLocalMove(
|
|
3893
|
+
getLocalTotal(relative) {
|
|
3894
|
+
return this.getLocalMove(relative, true);
|
|
3886
3895
|
}
|
|
3887
3896
|
assignMove(total) {
|
|
3888
3897
|
move.x = total ? this.totalX : this.moveX;
|
|
@@ -3901,17 +3910,16 @@ DragEvent = __decorate([
|
|
|
3901
3910
|
registerUIEvent()
|
|
3902
3911
|
], DragEvent);
|
|
3903
3912
|
|
|
3904
|
-
|
|
3905
|
-
let DropEvent = DropEvent_1 = class DropEvent extends PointerEvent {
|
|
3913
|
+
let DropEvent = class DropEvent extends PointerEvent {
|
|
3906
3914
|
static setList(data) {
|
|
3907
|
-
|
|
3915
|
+
DragEvent.setList(data);
|
|
3908
3916
|
}
|
|
3909
3917
|
static setData(data) {
|
|
3910
|
-
|
|
3918
|
+
DragEvent.setData(data);
|
|
3911
3919
|
}
|
|
3912
3920
|
};
|
|
3913
3921
|
DropEvent.DROP = 'drop';
|
|
3914
|
-
DropEvent =
|
|
3922
|
+
DropEvent = __decorate([
|
|
3915
3923
|
registerUIEvent()
|
|
3916
3924
|
], DropEvent);
|
|
3917
3925
|
|
|
@@ -4018,7 +4026,6 @@ class Transformer {
|
|
|
4018
4026
|
this.moveEnd();
|
|
4019
4027
|
this.zoomEnd();
|
|
4020
4028
|
this.rotateEnd();
|
|
4021
|
-
this.transformMode = null;
|
|
4022
4029
|
}
|
|
4023
4030
|
moveEnd() {
|
|
4024
4031
|
if (this.moveData) {
|
|
@@ -4043,7 +4050,7 @@ class Transformer {
|
|
|
4043
4050
|
}
|
|
4044
4051
|
}
|
|
4045
4052
|
|
|
4046
|
-
const { copy: copy$5,
|
|
4053
|
+
const { copy: copy$5, toInnerPoint: toInnerPoint$1, scaleOfOuter: scaleOfOuter$3, rotateOfOuter: rotateOfOuter$3, skewOfOuter } = MatrixHelper;
|
|
4047
4054
|
const matrix = {};
|
|
4048
4055
|
const LeafHelper = {
|
|
4049
4056
|
updateAllWorldMatrix(leaf) {
|
|
@@ -4086,63 +4093,41 @@ const LeafHelper = {
|
|
|
4086
4093
|
return true;
|
|
4087
4094
|
},
|
|
4088
4095
|
moveWorld(t, x, y) {
|
|
4089
|
-
t.__layout.checkUpdate();
|
|
4090
4096
|
const local = { x, y };
|
|
4091
4097
|
if (t.parent)
|
|
4092
|
-
toInnerPoint$1(t.parent.
|
|
4098
|
+
toInnerPoint$1(t.parent.worldTransform, local, local, true);
|
|
4093
4099
|
L.moveLocal(t, local.x, local.y);
|
|
4094
4100
|
},
|
|
4095
4101
|
moveLocal(t, x, y = 0) {
|
|
4096
4102
|
t.x += x;
|
|
4097
4103
|
t.y += y;
|
|
4098
4104
|
},
|
|
4099
|
-
zoomOfWorld(t, origin, scaleX, scaleY
|
|
4100
|
-
|
|
4101
|
-
const local = t.parent ? PointHelper.tempToInnerOf(origin, t.parent.__world) : origin;
|
|
4102
|
-
this.zoomOfLocal(t, local, scaleX, scaleY, moveLayer);
|
|
4105
|
+
zoomOfWorld(t, origin, scaleX, scaleY) {
|
|
4106
|
+
this.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY);
|
|
4103
4107
|
},
|
|
4104
|
-
zoomOfLocal(t, origin, scaleX, scaleY = scaleX
|
|
4108
|
+
zoomOfLocal(t, origin, scaleX, scaleY = scaleX) {
|
|
4105
4109
|
copy$5(matrix, t.__local);
|
|
4106
|
-
if (moveLayer)
|
|
4107
|
-
translate$2(matrix, moveLayer.x, moveLayer.y);
|
|
4108
4110
|
scaleOfOuter$3(matrix, origin, scaleX, scaleY);
|
|
4109
|
-
|
|
4110
|
-
moveLayer = t;
|
|
4111
|
-
moveLayer.x += matrix.e - t.__local.e;
|
|
4112
|
-
moveLayer.y += matrix.f - t.__local.f;
|
|
4111
|
+
moveByMatrix(t, matrix);
|
|
4113
4112
|
t.scaleX *= scaleX;
|
|
4114
4113
|
t.scaleY *= scaleY;
|
|
4115
4114
|
},
|
|
4116
|
-
rotateOfWorld(t, origin, angle
|
|
4117
|
-
|
|
4118
|
-
const local = t.parent ? PointHelper.tempToInnerOf(origin, t.parent.__world) : origin;
|
|
4119
|
-
this.rotateOfLocal(t, local, angle, moveLayer);
|
|
4115
|
+
rotateOfWorld(t, origin, angle) {
|
|
4116
|
+
this.rotateOfLocal(t, getTempLocal(t, origin), angle);
|
|
4120
4117
|
},
|
|
4121
|
-
rotateOfLocal(t, origin, angle
|
|
4118
|
+
rotateOfLocal(t, origin, angle) {
|
|
4122
4119
|
copy$5(matrix, t.__local);
|
|
4123
|
-
if (moveLayer)
|
|
4124
|
-
translate$2(matrix, moveLayer.x, moveLayer.y);
|
|
4125
4120
|
rotateOfOuter$3(matrix, origin, angle);
|
|
4126
|
-
|
|
4127
|
-
moveLayer = t;
|
|
4128
|
-
moveLayer.x += matrix.e - t.__local.e;
|
|
4129
|
-
moveLayer.y += matrix.f - t.__local.f;
|
|
4121
|
+
moveByMatrix(t, matrix);
|
|
4130
4122
|
t.rotation = MathHelper.formatRotation(t.rotation + angle);
|
|
4131
4123
|
},
|
|
4132
|
-
skewOfWorld(t, origin, skewX, skewY
|
|
4133
|
-
|
|
4134
|
-
const local = t.parent ? PointHelper.tempToInnerOf(origin, t.parent.__world) : origin;
|
|
4135
|
-
this.skewOfLocal(t, local, skewX, skewY, moveLayer);
|
|
4124
|
+
skewOfWorld(t, origin, skewX, skewY) {
|
|
4125
|
+
this.skewOfLocal(t, getTempLocal(t, origin), skewX, skewY);
|
|
4136
4126
|
},
|
|
4137
|
-
skewOfLocal(t, origin, skewX, skewY
|
|
4127
|
+
skewOfLocal(t, origin, skewX, skewY) {
|
|
4138
4128
|
copy$5(matrix, t.__local);
|
|
4139
|
-
if (moveLayer)
|
|
4140
|
-
translate$2(matrix, moveLayer.x, moveLayer.y);
|
|
4141
4129
|
skewOfOuter(matrix, origin, skewX, skewY);
|
|
4142
|
-
|
|
4143
|
-
moveLayer = t;
|
|
4144
|
-
moveLayer.x = matrix.e - t.__local.e;
|
|
4145
|
-
moveLayer.y = matrix.f - t.__local.f;
|
|
4130
|
+
moveByMatrix(t, matrix);
|
|
4146
4131
|
t.skewX = MathHelper.formatSkew(t.skewX + skewX);
|
|
4147
4132
|
t.skewY = MathHelper.formatSkew(t.skewY + skewY);
|
|
4148
4133
|
},
|
|
@@ -4156,6 +4141,14 @@ const LeafHelper = {
|
|
|
4156
4141
|
};
|
|
4157
4142
|
const L = LeafHelper;
|
|
4158
4143
|
const { updateAllWorldMatrix: updateAllWorldMatrix$2, updateAllWorldOpacity: updateAllWorldOpacity$1, updateAllChange: updateAllChange$1 } = L;
|
|
4144
|
+
function moveByMatrix(t, matrix) {
|
|
4145
|
+
t.x += matrix.e - t.__local.e;
|
|
4146
|
+
t.y += matrix.f - t.__local.f;
|
|
4147
|
+
}
|
|
4148
|
+
function getTempLocal(t, world) {
|
|
4149
|
+
t.__layout.checkUpdate();
|
|
4150
|
+
return t.parent ? PointHelper.tempToInnerOf(world, t.parent.__world) : world;
|
|
4151
|
+
}
|
|
4159
4152
|
|
|
4160
4153
|
const LeafBoundsHelper = {
|
|
4161
4154
|
worldBounds(target) {
|
|
@@ -4317,7 +4310,8 @@ const InteractionHelper = {
|
|
|
4317
4310
|
};
|
|
4318
4311
|
const I = InteractionHelper;
|
|
4319
4312
|
|
|
4320
|
-
const
|
|
4313
|
+
const emptyList = new LeafList();
|
|
4314
|
+
const { getDragEventData, getDropEventData, getSwipeEventData } = InteractionHelper;
|
|
4321
4315
|
class Dragger {
|
|
4322
4316
|
constructor(interaction) {
|
|
4323
4317
|
this.interaction = interaction;
|
|
@@ -4325,8 +4319,8 @@ class Dragger {
|
|
|
4325
4319
|
setDragData(data) {
|
|
4326
4320
|
this.dragData = getDragEventData(data, data, data);
|
|
4327
4321
|
}
|
|
4328
|
-
|
|
4329
|
-
return this.dragging ?
|
|
4322
|
+
getList() {
|
|
4323
|
+
return this.dragging ? (DragEvent.list || this.interaction.selector.list || this.dragableList || emptyList) : emptyList;
|
|
4330
4324
|
}
|
|
4331
4325
|
checkDrag(data, canDrag) {
|
|
4332
4326
|
const { interaction } = this;
|
|
@@ -4355,7 +4349,7 @@ class Dragger {
|
|
|
4355
4349
|
interaction.emit(MoveEvent.MOVE, this.dragData);
|
|
4356
4350
|
}
|
|
4357
4351
|
else if (this.dragging) {
|
|
4358
|
-
this.
|
|
4352
|
+
this.realDrag();
|
|
4359
4353
|
interaction.emit(DragEvent.BEFORE_DRAG, this.dragData);
|
|
4360
4354
|
interaction.emit(DragEvent.DRAG, this.dragData);
|
|
4361
4355
|
}
|
|
@@ -4366,9 +4360,6 @@ class Dragger {
|
|
|
4366
4360
|
if (this.dragging) {
|
|
4367
4361
|
this.interaction.emit(DragEvent.START, this.dragData);
|
|
4368
4362
|
this.getDragableList(this.dragData.path);
|
|
4369
|
-
this.dragList = filterPathByEventType(this.dragData.path, DragEvent.DRAG);
|
|
4370
|
-
if (!this.dragList.length && this.dragableList)
|
|
4371
|
-
this.dragList.pushList(this.dragableList);
|
|
4372
4363
|
}
|
|
4373
4364
|
}
|
|
4374
4365
|
}
|
|
@@ -4377,16 +4368,17 @@ class Dragger {
|
|
|
4377
4368
|
for (let i = 0, len = path.length; i < len; i++) {
|
|
4378
4369
|
leaf = path.list[i];
|
|
4379
4370
|
if (leaf.__.draggable && leaf.__.hitSelf) {
|
|
4380
|
-
this.dragableList =
|
|
4371
|
+
this.dragableList = new LeafList(leaf);
|
|
4381
4372
|
break;
|
|
4382
4373
|
}
|
|
4383
4374
|
}
|
|
4384
4375
|
}
|
|
4385
|
-
|
|
4376
|
+
realDrag() {
|
|
4386
4377
|
const { running } = this.interaction;
|
|
4387
|
-
|
|
4378
|
+
const list = this.getList();
|
|
4379
|
+
if (list.length && running) {
|
|
4388
4380
|
const { moveX, moveY } = this.dragData;
|
|
4389
|
-
|
|
4381
|
+
list.forEach(leaf => {
|
|
4390
4382
|
LeafHelper.moveWorld(leaf, moveX, moveY);
|
|
4391
4383
|
});
|
|
4392
4384
|
}
|
|
@@ -4443,20 +4435,14 @@ class Dragger {
|
|
|
4443
4435
|
}
|
|
4444
4436
|
}
|
|
4445
4437
|
drop(data) {
|
|
4446
|
-
const dropData = getDropEventData(data, this.
|
|
4438
|
+
const dropData = getDropEventData(data, this.getList(), DragEvent.data);
|
|
4447
4439
|
dropData.path = this.dragEnterPath;
|
|
4448
4440
|
this.interaction.emit(DropEvent.DROP, dropData);
|
|
4449
4441
|
this.interaction.emit(DragEvent.LEAVE, data, this.dragEnterPath);
|
|
4450
4442
|
}
|
|
4451
4443
|
dragReset() {
|
|
4452
|
-
|
|
4453
|
-
this.
|
|
4454
|
-
this.dragableList = null;
|
|
4455
|
-
this.dragData = null;
|
|
4456
|
-
this.dragOverPath = null;
|
|
4457
|
-
this.dragEnterPath = null;
|
|
4458
|
-
this.dragging = null;
|
|
4459
|
-
this.moving = null;
|
|
4444
|
+
DragEvent.list = DragEvent.data = this.dragableList = this.dragData = this.dragOverPath = this.dragEnterPath = null;
|
|
4445
|
+
this.dragging = this.moving = false;
|
|
4460
4446
|
}
|
|
4461
4447
|
checkDragOut(data) {
|
|
4462
4448
|
const { interaction } = this;
|
|
@@ -4692,6 +4678,10 @@ class InteractionBase {
|
|
|
4692
4678
|
this.zoom(getZoomEventData(center, scale, data));
|
|
4693
4679
|
this.move(getMoveEventData(center, move, data));
|
|
4694
4680
|
}
|
|
4681
|
+
menu(data) {
|
|
4682
|
+
this.findPath(data);
|
|
4683
|
+
this.emit(PointerEvent.MENU, data);
|
|
4684
|
+
}
|
|
4695
4685
|
move(data) {
|
|
4696
4686
|
this.transformer.move(data);
|
|
4697
4687
|
}
|
|
@@ -4801,6 +4791,9 @@ class InteractionBase {
|
|
|
4801
4791
|
data.path = find.path;
|
|
4802
4792
|
return find.path;
|
|
4803
4793
|
}
|
|
4794
|
+
isDrag(leaf) {
|
|
4795
|
+
return this.dragger.getList().has(leaf);
|
|
4796
|
+
}
|
|
4804
4797
|
updateDownData(data) {
|
|
4805
4798
|
if (!data)
|
|
4806
4799
|
data = this.downData;
|
|
@@ -4814,7 +4807,7 @@ class InteractionBase {
|
|
|
4814
4807
|
data = this.hoverData;
|
|
4815
4808
|
if (!data)
|
|
4816
4809
|
return;
|
|
4817
|
-
this.findPath(data, { exclude: this.dragger.
|
|
4810
|
+
this.findPath(data, { exclude: this.dragger.getList(), name: PointerEvent.MOVE });
|
|
4818
4811
|
this.hoverData = data;
|
|
4819
4812
|
}
|
|
4820
4813
|
updateCursor(data) {
|
|
@@ -4934,7 +4927,7 @@ class LeafLayout {
|
|
|
4934
4927
|
this.renderBounds = this.strokeBounds = this.boxBounds = { x: 0, y: 0, width: 0, height: 0 };
|
|
4935
4928
|
this.localRenderBounds = this.localStrokeBounds = leaf.__local;
|
|
4936
4929
|
this.boxChange();
|
|
4937
|
-
this.
|
|
4930
|
+
this.matrixChange();
|
|
4938
4931
|
}
|
|
4939
4932
|
checkUpdate(force) {
|
|
4940
4933
|
const { leafer } = this.leaf;
|
|
@@ -5061,11 +5054,6 @@ class LeafLayout {
|
|
|
5061
5054
|
this.renderSpread || (this.renderSpread = 1);
|
|
5062
5055
|
this.boundsChanged = true;
|
|
5063
5056
|
}
|
|
5064
|
-
positionChange() {
|
|
5065
|
-
this.positionChanged = true;
|
|
5066
|
-
this.matrixChanged = true;
|
|
5067
|
-
this.localBoxChanged || this.localBoxChange();
|
|
5068
|
-
}
|
|
5069
5057
|
scaleChange() {
|
|
5070
5058
|
this.scaleChanged = true;
|
|
5071
5059
|
this._scaleOrRotationChange();
|
|
@@ -5077,6 +5065,9 @@ class LeafLayout {
|
|
|
5077
5065
|
}
|
|
5078
5066
|
_scaleOrRotationChange() {
|
|
5079
5067
|
this.affectScaleOrRotation = true;
|
|
5068
|
+
this.matrixChange();
|
|
5069
|
+
}
|
|
5070
|
+
matrixChange() {
|
|
5080
5071
|
this.matrixChanged = true;
|
|
5081
5072
|
this.localBoxChanged || this.localBoxChange();
|
|
5082
5073
|
}
|
|
@@ -5219,10 +5210,11 @@ function __getListenerMap(eventer, capture, create) {
|
|
|
5219
5210
|
const LeafDataProxy = {
|
|
5220
5211
|
__setAttr(name, newValue) {
|
|
5221
5212
|
if (this.leafer && this.leafer.created) {
|
|
5222
|
-
|
|
5213
|
+
const oldValue = this.__.__getInput(name);
|
|
5214
|
+
if (typeof newValue === 'object' || oldValue !== newValue) {
|
|
5223
5215
|
this.__[name] = newValue;
|
|
5224
5216
|
const { CHANGE } = PropertyEvent;
|
|
5225
|
-
const event = new PropertyEvent(CHANGE, this, name,
|
|
5217
|
+
const event = new PropertyEvent(CHANGE, this, name, oldValue, newValue);
|
|
5226
5218
|
if (this.hasEvent(CHANGE) && !this.isLeafer)
|
|
5227
5219
|
this.emitEvent(event);
|
|
5228
5220
|
this.leafer.emitEvent(event);
|
|
@@ -5313,17 +5305,17 @@ const LeafMatrix = {
|
|
|
5313
5305
|
}
|
|
5314
5306
|
}
|
|
5315
5307
|
}
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5308
|
+
const { x, y, around } = this.__;
|
|
5309
|
+
r.e = x;
|
|
5310
|
+
r.f = y;
|
|
5311
|
+
if (around) {
|
|
5312
|
+
const { width, height } = this.__;
|
|
5313
|
+
if (width && height) {
|
|
5321
5314
|
const origin = (around === 'center') ? defaultCenter : around;
|
|
5322
5315
|
const offsetX = width * origin.x, offsetY = height * origin.y;
|
|
5323
5316
|
r.e -= offsetX * r.a + offsetY * r.c;
|
|
5324
5317
|
r.f -= offsetX * r.b + offsetY * r.d;
|
|
5325
5318
|
}
|
|
5326
|
-
layout.positionChanged = false;
|
|
5327
5319
|
}
|
|
5328
5320
|
this.__layout.matrixChanged = false;
|
|
5329
5321
|
}
|
|
@@ -5418,7 +5410,7 @@ const LeafBounds = {
|
|
|
5418
5410
|
data.__naturalWidth = layout.boxBounds.width;
|
|
5419
5411
|
data.__naturalHeight = layout.boxBounds.height;
|
|
5420
5412
|
if (this.around) {
|
|
5421
|
-
layout.
|
|
5413
|
+
layout.matrixChanged = true;
|
|
5422
5414
|
this.__updateWorldMatrix();
|
|
5423
5415
|
}
|
|
5424
5416
|
},
|
|
@@ -5606,11 +5598,16 @@ let Leaf = class Leaf {
|
|
|
5606
5598
|
get __ignoreHitWorld() { return (this.__hasMask || this.__hasEraser) && this.__.hitChildren; }
|
|
5607
5599
|
constructor(data) {
|
|
5608
5600
|
this.innerId = create(LEAF);
|
|
5601
|
+
this.reset(data);
|
|
5602
|
+
}
|
|
5603
|
+
reset(data) {
|
|
5609
5604
|
this.__world = { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0, x: 0, y: 0, width: 0, height: 0, scaleX: 1, scaleY: 1, rotation: 0, skewX: 0, skewY: 0 };
|
|
5610
5605
|
this.__local = { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0, x: 0, y: 0, width: 0, height: 0 };
|
|
5611
5606
|
this.__worldOpacity = 1;
|
|
5612
5607
|
this.__ = new this.__DataProcessor(this);
|
|
5613
5608
|
this.__layout = new this.__LayoutProcessor(this);
|
|
5609
|
+
if (this.__level)
|
|
5610
|
+
this.resetCustom();
|
|
5614
5611
|
if (data) {
|
|
5615
5612
|
if (data.children) {
|
|
5616
5613
|
this.set(data);
|
|
@@ -5620,6 +5617,10 @@ let Leaf = class Leaf {
|
|
|
5620
5617
|
}
|
|
5621
5618
|
}
|
|
5622
5619
|
}
|
|
5620
|
+
resetCustom() {
|
|
5621
|
+
this.__hasMask = this.__hasEraser = null;
|
|
5622
|
+
this.forceUpdate();
|
|
5623
|
+
}
|
|
5623
5624
|
waitParent(item) {
|
|
5624
5625
|
this.parent ? item() : (this.__parentWait ? this.__parentWait.push(item) : this.__parentWait = [item]);
|
|
5625
5626
|
}
|
|
@@ -5634,8 +5635,11 @@ let Leaf = class Leaf {
|
|
|
5634
5635
|
if (leafer !== null)
|
|
5635
5636
|
leafer = this;
|
|
5636
5637
|
}
|
|
5638
|
+
if (this.leafer && !leafer)
|
|
5639
|
+
this.leafer.leafs--;
|
|
5637
5640
|
this.leafer = leafer;
|
|
5638
5641
|
if (leafer) {
|
|
5642
|
+
leafer.leafs++;
|
|
5639
5643
|
this.__level = this.parent ? this.parent.__level + 1 : 1;
|
|
5640
5644
|
if (this.__leaferWait)
|
|
5641
5645
|
WaitHelper.run(this.__leaferWait);
|
|
@@ -5658,7 +5662,7 @@ let Leaf = class Leaf {
|
|
|
5658
5662
|
__getAttr(_attrName) { return undefined; }
|
|
5659
5663
|
forceUpdate(attrName) {
|
|
5660
5664
|
if (attrName === undefined)
|
|
5661
|
-
attrName = '
|
|
5665
|
+
attrName = 'width';
|
|
5662
5666
|
else if (attrName === 'surface')
|
|
5663
5667
|
attrName = 'blendMode';
|
|
5664
5668
|
const value = this.__.__getInput(attrName);
|
|
@@ -5865,7 +5869,7 @@ let Branch = class Branch extends Leaf {
|
|
|
5865
5869
|
index === undefined ? this.children.push(child) : this.children.splice(index, 0, child);
|
|
5866
5870
|
if (child.isBranch)
|
|
5867
5871
|
this.__.__childBranchNumber = (this.__.__childBranchNumber || 0) + 1;
|
|
5868
|
-
child.__layout.boundsChanged || child.__layout.
|
|
5872
|
+
child.__layout.boundsChanged || child.__layout.matrixChange();
|
|
5869
5873
|
if (child.__parentWait)
|
|
5870
5874
|
WaitHelper.run(child.__parentWait);
|
|
5871
5875
|
if (this.leafer) {
|
|
@@ -6084,7 +6088,7 @@ function updateMatrix(updateList, levelList) {
|
|
|
6084
6088
|
let layout;
|
|
6085
6089
|
updateList.list.forEach(leaf => {
|
|
6086
6090
|
layout = leaf.__layout;
|
|
6087
|
-
if (levelList.without(leaf) && !layout.
|
|
6091
|
+
if (levelList.without(leaf) && !layout.proxyZoom) {
|
|
6088
6092
|
if (layout.matrixChanged) {
|
|
6089
6093
|
updateAllWorldMatrix$1(leaf);
|
|
6090
6094
|
levelList.push(leaf);
|
|
@@ -6403,8 +6407,7 @@ class Renderer {
|
|
|
6403
6407
|
const { canvas, updateBlocks: list } = this;
|
|
6404
6408
|
if (!list)
|
|
6405
6409
|
return debug$3.warn('PartRender: need update attr');
|
|
6406
|
-
|
|
6407
|
-
this.mergeBlocks();
|
|
6410
|
+
this.mergeBlocks();
|
|
6408
6411
|
list.forEach(block => { if (canvas.bounds.hit(block) && !block.isEmpty())
|
|
6409
6412
|
this.clipRender(block); });
|
|
6410
6413
|
}
|
|
@@ -6423,7 +6426,7 @@ class Renderer {
|
|
|
6423
6426
|
canvas.clearWorld(bounds, true);
|
|
6424
6427
|
canvas.clipWorld(bounds, true);
|
|
6425
6428
|
}
|
|
6426
|
-
this.__render(bounds, realBounds);
|
|
6429
|
+
this.__render(bounds, includes, realBounds);
|
|
6427
6430
|
canvas.restore();
|
|
6428
6431
|
Run.end(t);
|
|
6429
6432
|
}
|
|
@@ -6432,12 +6435,12 @@ class Renderer {
|
|
|
6432
6435
|
const { canvas } = this;
|
|
6433
6436
|
canvas.save();
|
|
6434
6437
|
canvas.clear();
|
|
6435
|
-
this.__render(canvas.bounds);
|
|
6438
|
+
this.__render(canvas.bounds, true);
|
|
6436
6439
|
canvas.restore();
|
|
6437
6440
|
Run.end(t);
|
|
6438
6441
|
}
|
|
6439
|
-
__render(bounds, realBounds) {
|
|
6440
|
-
const options =
|
|
6442
|
+
__render(bounds, includes, realBounds) {
|
|
6443
|
+
const options = bounds.includes(this.target.__world) ? { includes } : { bounds, includes };
|
|
6441
6444
|
if (this.needFill)
|
|
6442
6445
|
this.canvas.fillWorld(bounds, this.config.fill);
|
|
6443
6446
|
if (Debug.showRepaint)
|
|
@@ -7097,6 +7100,11 @@ function useCanvas(_canvasType, app) {
|
|
|
7097
7100
|
app.offWindowResize(fun);
|
|
7098
7101
|
}
|
|
7099
7102
|
};
|
|
7103
|
+
Platform.event = {
|
|
7104
|
+
stopDefault(_origin) { },
|
|
7105
|
+
stopNow(_origin) { },
|
|
7106
|
+
stop(_origin) { }
|
|
7107
|
+
};
|
|
7100
7108
|
Platform.canvas = Creator.canvas();
|
|
7101
7109
|
Platform.conicGradientSupport = !!Platform.canvas.context.createConicGradient;
|
|
7102
7110
|
}
|
|
@@ -7114,7 +7122,7 @@ function draw(leafer) {
|
|
|
7114
7122
|
function design(leafer) {
|
|
7115
7123
|
if (leafer.isApp)
|
|
7116
7124
|
return;
|
|
7117
|
-
leafer.__eventIds.push(leafer.on_(MoveEvent.BEFORE_MOVE, (e) => { LeafHelper.moveWorld(leafer.
|
|
7125
|
+
leafer.__eventIds.push(leafer.on_(MoveEvent.BEFORE_MOVE, (e) => { LeafHelper.moveWorld(leafer.zoomLayer, e.moveX, e.moveY); }), leafer.on_(ZoomEvent.BEFORE_ZOOM, (e) => {
|
|
7118
7126
|
const { scaleX } = leafer.zoomLayer.__, { min, max } = leafer.config.zoom;
|
|
7119
7127
|
let { scale } = e;
|
|
7120
7128
|
if (scale * Math.abs(scaleX) < min)
|
|
@@ -7195,6 +7203,8 @@ class UIData extends LeafData {
|
|
|
7195
7203
|
this.__removeInput('fill');
|
|
7196
7204
|
Paint.recycleImage('fill', this);
|
|
7197
7205
|
this.__isFills = false;
|
|
7206
|
+
if (this.__pixelFill)
|
|
7207
|
+
this.__pixelFill = false;
|
|
7198
7208
|
}
|
|
7199
7209
|
this._fill = value;
|
|
7200
7210
|
}
|
|
@@ -7211,6 +7221,8 @@ class UIData extends LeafData {
|
|
|
7211
7221
|
this.__removeInput('stroke');
|
|
7212
7222
|
Paint.recycleImage('stroke', this);
|
|
7213
7223
|
this.__isStrokes = false;
|
|
7224
|
+
if (this.__pixelStroke)
|
|
7225
|
+
this.__pixelStroke = false;
|
|
7214
7226
|
}
|
|
7215
7227
|
this._stroke = value;
|
|
7216
7228
|
}
|
|
@@ -7508,9 +7520,9 @@ const UIRender = {
|
|
|
7508
7520
|
const { fill, stroke } = this.__;
|
|
7509
7521
|
this.__drawRenderPath(canvas);
|
|
7510
7522
|
if (fill)
|
|
7511
|
-
Paint.fill('#000000', this, canvas);
|
|
7523
|
+
this.__.__pixelFill ? Paint.fills(fill, this, canvas) : Paint.fill('#000000', this, canvas);
|
|
7512
7524
|
if (stroke)
|
|
7513
|
-
Paint.stroke('#000000', this, canvas, renderOptions);
|
|
7525
|
+
this.__.__pixelStroke ? Paint.strokes(stroke, this, canvas, renderOptions) : Paint.stroke('#000000', this, canvas, renderOptions);
|
|
7514
7526
|
}
|
|
7515
7527
|
};
|
|
7516
7528
|
|
|
@@ -7557,9 +7569,7 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
7557
7569
|
const { scaleX, scaleY } = this;
|
|
7558
7570
|
return scaleX !== scaleY ? { x: scaleX, y: scaleY } : scaleX;
|
|
7559
7571
|
}
|
|
7560
|
-
|
|
7561
|
-
super(data);
|
|
7562
|
-
}
|
|
7572
|
+
reset(_data) { }
|
|
7563
7573
|
set(data) {
|
|
7564
7574
|
Object.assign(this, data);
|
|
7565
7575
|
}
|
|
@@ -7748,6 +7758,9 @@ __decorate([
|
|
|
7748
7758
|
__decorate([
|
|
7749
7759
|
effectType()
|
|
7750
7760
|
], UI.prototype, "grayscale", void 0);
|
|
7761
|
+
__decorate([
|
|
7762
|
+
rewrite(Leaf.prototype.reset)
|
|
7763
|
+
], UI.prototype, "reset", null);
|
|
7751
7764
|
__decorate([
|
|
7752
7765
|
rewrite(PathDrawer.drawPathByData)
|
|
7753
7766
|
], UI.prototype, "__drawPathByData", null);
|
|
@@ -7785,8 +7798,12 @@ let Group = class Group extends UI {
|
|
|
7785
7798
|
if (data.children) {
|
|
7786
7799
|
const { children } = data;
|
|
7787
7800
|
delete data.children;
|
|
7788
|
-
if (!this.children)
|
|
7801
|
+
if (!this.children) {
|
|
7789
7802
|
this.__setBranch();
|
|
7803
|
+
}
|
|
7804
|
+
else {
|
|
7805
|
+
this.removeAll(true);
|
|
7806
|
+
}
|
|
7790
7807
|
super.set(data);
|
|
7791
7808
|
let child;
|
|
7792
7809
|
children.forEach(childData => {
|
|
@@ -7987,8 +8004,10 @@ let Ellipse = class Ellipse extends UI {
|
|
|
7987
8004
|
ellipse(path, rx, ry, rx * innerRadius, ry * innerRadius);
|
|
7988
8005
|
moveTo$3(path, width, ry);
|
|
7989
8006
|
}
|
|
7990
|
-
ellipse(path, rx, ry, rx, ry, 0,
|
|
8007
|
+
ellipse(path, rx, ry, rx, ry, 0, 360, 0, true);
|
|
7991
8008
|
}
|
|
8009
|
+
if (Platform.name === 'node')
|
|
8010
|
+
this.__.path = PathConvert.toCanvasData(path, true);
|
|
7992
8011
|
}
|
|
7993
8012
|
else {
|
|
7994
8013
|
if (startAngle || endAngle) {
|
|
@@ -8509,10 +8528,10 @@ let Leafer = class Leafer extends Group {
|
|
|
8509
8528
|
get __tag() { return 'Leafer'; }
|
|
8510
8529
|
get isApp() { return false; }
|
|
8511
8530
|
get app() { return this.parent || this; }
|
|
8531
|
+
get cursorPoint() { return (this.interaction && this.interaction.hoverData) || { x: this.width / 2, y: this.height / 2 }; }
|
|
8512
8532
|
constructor(userConfig, data) {
|
|
8513
8533
|
super(data);
|
|
8514
8534
|
this.zoomLayer = this;
|
|
8515
|
-
this.moveLayer = this;
|
|
8516
8535
|
this.config = {
|
|
8517
8536
|
type: 'design',
|
|
8518
8537
|
start: true,
|
|
@@ -8528,6 +8547,7 @@ let Leafer = class Leafer extends Group {
|
|
|
8528
8547
|
autoDistance: 2
|
|
8529
8548
|
}
|
|
8530
8549
|
};
|
|
8550
|
+
this.leafs = 0;
|
|
8531
8551
|
this.__eventIds = [];
|
|
8532
8552
|
this.__controllers = [];
|
|
8533
8553
|
this.__readyWait = [];
|
|
@@ -8641,9 +8661,8 @@ let Leafer = class Leafer extends Group {
|
|
|
8641
8661
|
this.isLeafer = !!leafer;
|
|
8642
8662
|
this.__level = 1;
|
|
8643
8663
|
}
|
|
8644
|
-
setZoomLayer(zoomLayer
|
|
8664
|
+
setZoomLayer(zoomLayer) {
|
|
8645
8665
|
this.zoomLayer = zoomLayer;
|
|
8646
|
-
this.moveLayer = moveLayer || zoomLayer;
|
|
8647
8666
|
}
|
|
8648
8667
|
__checkAutoLayout(config) {
|
|
8649
8668
|
if (!config.width || !config.height) {
|
|
@@ -9151,10 +9170,13 @@ function checkImage(ui, canvas, paint, allowPaint) {
|
|
|
9151
9170
|
createPattern(ui, paint, canvas.pixelRatio);
|
|
9152
9171
|
}
|
|
9153
9172
|
else {
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9173
|
+
if (!paint.patternTask) {
|
|
9174
|
+
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, void 0, void 0, function* () {
|
|
9175
|
+
paint.patternTask = null;
|
|
9176
|
+
if (canvas.bounds.hit(ui.__world) && createPattern(ui, paint, canvas.pixelRatio))
|
|
9177
|
+
ui.forceUpdate('surface');
|
|
9178
|
+
}), 300);
|
|
9179
|
+
}
|
|
9158
9180
|
}
|
|
9159
9181
|
return false;
|
|
9160
9182
|
}
|
|
@@ -9518,17 +9540,30 @@ function conicGradient(paint, box) {
|
|
|
9518
9540
|
let recycleMap;
|
|
9519
9541
|
function compute(attrName, ui) {
|
|
9520
9542
|
const value = [];
|
|
9543
|
+
const data = ui.__;
|
|
9521
9544
|
let item;
|
|
9522
|
-
let paints =
|
|
9545
|
+
let paints = data.__input[attrName];
|
|
9523
9546
|
if (!(paints instanceof Array))
|
|
9524
9547
|
paints = [paints];
|
|
9525
|
-
recycleMap = recycleImage(attrName,
|
|
9548
|
+
recycleMap = recycleImage(attrName, data);
|
|
9526
9549
|
for (let i = 0, len = paints.length; i < len; i++) {
|
|
9527
9550
|
item = getLeafPaint(attrName, paints[i], ui);
|
|
9528
9551
|
if (item)
|
|
9529
9552
|
value.push(item);
|
|
9530
9553
|
}
|
|
9531
|
-
|
|
9554
|
+
data['_' + attrName] = value.length ? value : undefined;
|
|
9555
|
+
let isPixel;
|
|
9556
|
+
if (paints.length === 1) {
|
|
9557
|
+
const paint = paints[0];
|
|
9558
|
+
if (paint.type === 'image')
|
|
9559
|
+
isPixel = ImageManager.isPixel(paint);
|
|
9560
|
+
}
|
|
9561
|
+
if (attrName === 'fill') {
|
|
9562
|
+
data.__pixelFill = isPixel;
|
|
9563
|
+
}
|
|
9564
|
+
else {
|
|
9565
|
+
data.__pixelStroke = isPixel;
|
|
9566
|
+
}
|
|
9532
9567
|
}
|
|
9533
9568
|
function getLeafPaint(attrName, paint, ui) {
|
|
9534
9569
|
if (typeof paint !== 'object' || paint.visible === false || paint.opacity === 0)
|
|
@@ -10217,4 +10252,4 @@ LeaferCanvas.prototype.updateViewSize = function () {
|
|
|
10217
10252
|
}
|
|
10218
10253
|
};
|
|
10219
10254
|
|
|
10220
|
-
export { Animate, AnimateEvent, App, AutoBounds, BezierHelper, Bounds, BoundsHelper, Box, Branch, BranchHelper, BranchRender, Canvas, CanvasManager, ChildEvent, ColorConvert$1 as ColorConvert, Creator, Cursor, DataHelper, Debug, DragEvent, DropEvent, Effect, Ellipse, EllipseHelper, Event, EventCreator, Export$1 as Export, FileHelper, Frame, Group, HitCanvasManager, Image, ImageEvent, ImageManager, IncrementId, Interaction, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafHit, LeafLayout, LeafLevelList, LeafList, LeafMask, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferEvent, LeaferImage, LeaferTypeCreator, Line, MathHelper, Matrix, MatrixHelper, MoveEvent, MultiTouchHelper, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, Path, PathBounds, PathCommandDataHelper, PathCommandMap, PathConvert, PathCorner, PathCreator, PathDrawer, PathHelper, PathNumberCommandLengthMap, PathNumberCommandMap, Pen, Platform, PluginManager, Point, PointHelper, PointerButton, PointerEvent, Polygon, PropertyEvent, Rect, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, RotateEvent, Run, Selector, Star, StringNumberMap, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert$1 as TextConvert,
|
|
10255
|
+
export { Animate, AnimateEvent, App, AutoBounds, BezierHelper, Bounds, BoundsHelper, Box, Branch, BranchHelper, BranchRender, Canvas, CanvasManager, ChildEvent, ColorConvert$1 as ColorConvert, Creator, Cursor, DataHelper, Debug, DragEvent, DropEvent, Effect, Ellipse, EllipseHelper, Event, EventCreator, Export$1 as Export, FileHelper, Frame, Group, HitCanvasManager, Image, ImageEvent, ImageManager, IncrementId, Interaction, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafHit, LeafLayout, LeafLevelList, LeafList, LeafMask, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferEvent, LeaferImage, LeaferTypeCreator, Line, MathHelper, Matrix, MatrixHelper, MoveEvent, MultiTouchHelper, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, Path, PathBounds, PathCommandDataHelper, PathCommandMap, PathConvert, PathCorner, PathCreator, PathDrawer, PathHelper, PathNumberCommandLengthMap, PathNumberCommandMap, Pen, Platform, PluginManager, Point, PointHelper, PointerButton, PointerEvent, Polygon, PropertyEvent, Rect, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, RotateEvent, Run, Selector, Star, StringNumberMap, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert$1 as TextConvert, TwoPointBounds, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIEvent, UIHit, UIRender, WaitHelper, WatchEvent, Watcher, ZoomEvent, affectRenderBoundsType, affectStrokeBoundsType, aliasType, boundsType, canvasPatch, canvasSizeAttrs, cursorType, dataProcessor, dataType, defineDataProcessor, defineKey, defineLeafAttr, effectType, eraserType, getDescriptor, hitType, layoutProcessor, maskType, opacityType, pathType, positionType, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleType, setDefaultValue, sortType, strokeType, surfaceType, useCanvas, useModule, usePlugin };
|