@inweb/markup 25.7.8 → 25.7.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/markup.js CHANGED
@@ -12397,15 +12397,7 @@
12397
12397
  .join(" ");
12398
12398
  this.removeTextInput();
12399
12399
  this.removeImageInput();
12400
- const konvaShape = MarkupMode2Konva[draggerName];
12401
- if (konvaShape) {
12402
- this._markupMode = draggerName;
12403
- this._markupIsActive = true;
12404
- }
12405
- else {
12406
- this._markupIsActive = false;
12407
- this._konvaTransformer.nodes([]);
12408
- }
12400
+ this.enableEditMode(draggerName);
12409
12401
  };
12410
12402
  this.resizeContainer = (entries) => {
12411
12403
  var _a, _b;
@@ -12529,6 +12521,17 @@
12529
12521
  viewpoint.description = new Date().toDateString();
12530
12522
  return viewpoint;
12531
12523
  }
12524
+ enableEditMode(mode) {
12525
+ if (!mode || !MarkupMode2Konva[mode]) {
12526
+ this.clearSelected();
12527
+ this._markupIsActive = false;
12528
+ }
12529
+ else {
12530
+ this._markupMode = mode;
12531
+ this._markupIsActive = true;
12532
+ }
12533
+ return this;
12534
+ }
12532
12535
  createObject(type, params) {
12533
12536
  let object = null;
12534
12537
  let zIndex = this._zIndex;