@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 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(() => simulateTarget.reset(bounds.setListWithFn(list, (leaf) => leaf.getBounds('box', 'page')).get()));
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