@leafer/miniapp 1.9.2 → 1.9.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/dist/miniapp.module.js +35 -15
- package/dist/miniapp.module.min.js +1 -1
- package/dist/miniapp.module.min.js.map +1 -1
- package/package.json +20 -20
package/dist/miniapp.module.js
CHANGED
|
@@ -1191,10 +1191,8 @@ const BoundsHelper = {
|
|
|
1191
1191
|
t.y += y;
|
|
1192
1192
|
},
|
|
1193
1193
|
scroll(t, data) {
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
t.y += data.scrollY;
|
|
1197
|
-
}
|
|
1194
|
+
t.x += data.scrollX;
|
|
1195
|
+
t.y += data.scrollY;
|
|
1198
1196
|
},
|
|
1199
1197
|
getByMove(t, x, y) {
|
|
1200
1198
|
t = Object.assign({}, t);
|
|
@@ -6741,7 +6739,7 @@ class LeafLevelList {
|
|
|
6741
6739
|
}
|
|
6742
6740
|
}
|
|
6743
6741
|
|
|
6744
|
-
const version = "1.9.
|
|
6742
|
+
const version = "1.9.3";
|
|
6745
6743
|
|
|
6746
6744
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6747
6745
|
get allowBackgroundColor() {
|
|
@@ -9096,7 +9094,10 @@ let Box = class Box extends Group {
|
|
|
9096
9094
|
const data = this.__, layout = this.__layout, {renderBounds: renderBounds, boxBounds: boxBounds} = layout;
|
|
9097
9095
|
const childrenRenderBounds = layout.childrenRenderBounds || (layout.childrenRenderBounds = getBoundsData());
|
|
9098
9096
|
super.__updateRenderBounds(childrenRenderBounds);
|
|
9099
|
-
|
|
9097
|
+
if (data.overflow.includes("scroll")) {
|
|
9098
|
+
add(childrenRenderBounds, boxBounds);
|
|
9099
|
+
scroll(childrenRenderBounds, data);
|
|
9100
|
+
}
|
|
9100
9101
|
this.__updateRectRenderBounds();
|
|
9101
9102
|
isOverflow = !includes$1(boxBounds, childrenRenderBounds);
|
|
9102
9103
|
if (isOverflow && data.overflow === "show") add(renderBounds, childrenRenderBounds);
|
|
@@ -14776,11 +14777,22 @@ let Editor = class Editor extends Group {
|
|
|
14776
14777
|
updateEditTool() {
|
|
14777
14778
|
this.unloadEditTool();
|
|
14778
14779
|
if (this.editing) {
|
|
14779
|
-
const
|
|
14780
|
-
|
|
14781
|
-
this.
|
|
14782
|
-
|
|
14783
|
-
|
|
14780
|
+
const target = this.element;
|
|
14781
|
+
let name = target.editOuter || "EditTool";
|
|
14782
|
+
const {beforeEditOuter: beforeEditOuter} = this.mergeConfig;
|
|
14783
|
+
if (beforeEditOuter) {
|
|
14784
|
+
const check = beforeEditOuter({
|
|
14785
|
+
target: target,
|
|
14786
|
+
name: name
|
|
14787
|
+
});
|
|
14788
|
+
if (isString(check)) name = check; else if (check === false) return;
|
|
14789
|
+
}
|
|
14790
|
+
if (EditToolCreator.list[name]) {
|
|
14791
|
+
const tool = this.editTool = this.editToolList[name] = this.editToolList[name] || EditToolCreator.get(name, this);
|
|
14792
|
+
this.editBox.load();
|
|
14793
|
+
tool.load();
|
|
14794
|
+
this.update();
|
|
14795
|
+
}
|
|
14784
14796
|
}
|
|
14785
14797
|
}
|
|
14786
14798
|
unloadEditTool() {
|
|
@@ -14873,13 +14885,21 @@ let Editor = class Editor extends Group {
|
|
|
14873
14885
|
if (isString(nameOrSelect)) name = nameOrSelect; else if (!select) select = nameOrSelect;
|
|
14874
14886
|
if (target && select) this.target = target;
|
|
14875
14887
|
if (this.single) {
|
|
14876
|
-
|
|
14877
|
-
|
|
14878
|
-
|
|
14888
|
+
if (!target) target = this.element;
|
|
14889
|
+
if (!name) name = target.editInner;
|
|
14890
|
+
const {beforeEditInner: beforeEditInner} = this.mergeConfig;
|
|
14891
|
+
if (beforeEditInner) {
|
|
14892
|
+
const check = beforeEditInner({
|
|
14893
|
+
target: target,
|
|
14894
|
+
name: name
|
|
14895
|
+
});
|
|
14896
|
+
if (isString(check)) name = check; else if (check === false) return;
|
|
14897
|
+
}
|
|
14898
|
+
if (EditToolCreator.list[name]) {
|
|
14879
14899
|
this.editTool.unload();
|
|
14880
14900
|
this.innerEditing = true;
|
|
14881
14901
|
this.innerEditor = this.editToolList[name] = this.editToolList[name] || EditToolCreator.get(name, this);
|
|
14882
|
-
this.innerEditor.editTarget =
|
|
14902
|
+
this.innerEditor.editTarget = target;
|
|
14883
14903
|
this.emitInnerEvent(InnerEditorEvent.BEFORE_OPEN);
|
|
14884
14904
|
this.innerEditor.load();
|
|
14885
14905
|
this.emitInnerEvent(InnerEditorEvent.OPEN);
|