@leafer-in/editor 1.4.1 → 1.4.2
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/editor.cjs +8 -1
- package/dist/editor.cjs.map +1 -1
- package/dist/editor.esm.js +8 -1
- package/dist/editor.esm.js.map +1 -1
- package/dist/editor.esm.min.js +1 -1
- package/dist/editor.esm.min.js.map +1 -1
- package/dist/editor.js +8 -1
- package/dist/editor.js.map +1 -1
- package/dist/editor.min.cjs +1 -1
- package/dist/editor.min.cjs.map +1 -1
- package/dist/editor.min.js +1 -1
- package/dist/editor.min.js.map +1 -1
- package/package.json +5 -5
- package/src/editor/simulate.ts +6 -1
package/dist/editor.cjs
CHANGED
|
@@ -1094,7 +1094,14 @@ const bounds = new draw.Bounds();
|
|
|
1094
1094
|
function simulate(editor) {
|
|
1095
1095
|
const { simulateTarget, list } = editor;
|
|
1096
1096
|
const { zoomLayer } = list[0].leafer.zoomLayer;
|
|
1097
|
-
simulateTarget.safeChange(() =>
|
|
1097
|
+
simulateTarget.safeChange(() => {
|
|
1098
|
+
bounds.setListWithFn(list, (leaf) => leaf.getBounds('box', 'page'));
|
|
1099
|
+
if (bounds.width === 0)
|
|
1100
|
+
bounds.width = 0.1;
|
|
1101
|
+
if (bounds.height === 0)
|
|
1102
|
+
bounds.height = 0.1;
|
|
1103
|
+
simulateTarget.reset(bounds.get());
|
|
1104
|
+
});
|
|
1098
1105
|
zoomLayer.add(simulateTarget);
|
|
1099
1106
|
}
|
|
1100
1107
|
|