@netless/forge-slide 1.0.8 → 1.0.10

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/slide.esm.js CHANGED
@@ -62979,11 +62979,17 @@ var ImageModel = class extends ElementModel {
62979
62979
  }
62980
62980
  styleKeys() {
62981
62981
  return {
62982
- include: [],
62982
+ include: ["src"],
62983
62983
  exclude: ["dashArray", "strokeColor", "fillColor", "strokeWidth"]
62984
62984
  };
62985
62985
  }
62986
- onStyleKeyUpdate(_key) {
62986
+ onStyleKeyUpdate(key) {
62987
+ if (key === "src") {
62988
+ const imgElement = this.imageSets.querySelector(`[id='${this.uuid}']`);
62989
+ if (imgElement) {
62990
+ imgElement.src = this.src;
62991
+ }
62992
+ }
62987
62993
  }
62988
62994
  editorConfig() {
62989
62995
  const cfg = new EditorConfig();
@@ -67331,6 +67337,9 @@ var WhiteboardApplication = class _WhiteboardApplication extends AbstractApplica
67331
67337
  }
67332
67338
  };
67333
67339
  this.emitter.clearPage = () => {
67340
+ if (!this.writableManager().isWritable()) {
67341
+ return;
67342
+ }
67334
67343
  this.getCurrentRendererModel().then((model) => {
67335
67344
  if (model) {
67336
67345
  if (model.elements.doc) {
@@ -67344,9 +67353,15 @@ var WhiteboardApplication = class _WhiteboardApplication extends AbstractApplica
67344
67353
  });
67345
67354
  };
67346
67355
  this.emitter.undo = () => {
67356
+ if (!this.writableManager().isWritable()) {
67357
+ return;
67358
+ }
67347
67359
  this.undoManager?.undo();
67348
67360
  };
67349
67361
  this.emitter.redo = () => {
67362
+ if (!this.writableManager().isWritable()) {
67363
+ return;
67364
+ }
67350
67365
  this.undoManager?.redo();
67351
67366
  };
67352
67367
  this.emitter.rasterizeViewport = (scale, page) => {