@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.js CHANGED
@@ -1092,7 +1092,14 @@ ${filterStyle}
1092
1092
  function simulate(editor) {
1093
1093
  const { simulateTarget, list } = editor;
1094
1094
  const { zoomLayer } = list[0].leafer.zoomLayer;
1095
- simulateTarget.safeChange(() => simulateTarget.reset(bounds.setListWithFn(list, (leaf) => leaf.getBounds('box', 'page')).get()));
1095
+ simulateTarget.safeChange(() => {
1096
+ bounds.setListWithFn(list, (leaf) => leaf.getBounds('box', 'page'));
1097
+ if (bounds.width === 0)
1098
+ bounds.width = 0.1;
1099
+ if (bounds.height === 0)
1100
+ bounds.height = 0.1;
1101
+ simulateTarget.reset(bounds.get());
1102
+ });
1096
1103
  zoomLayer.add(simulateTarget);
1097
1104
  }
1098
1105