@vanduo-oss/vd3-cbun 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.
@@ -1115,6 +1115,8 @@ var VdDraw = class {
1115
1115
  }
1116
1116
  if (this.toolbarEl) this.toolbarEl.style.display = "";
1117
1117
  if (this.panelEl) this.panelEl.style.display = "";
1118
+ this._syncToolbar();
1119
+ this._syncStylePanel();
1118
1120
  }
1119
1121
  this.render({ scene: false, overlay: true });
1120
1122
  return this;
@@ -1831,8 +1833,17 @@ var VdDraw = class {
1831
1833
  }
1832
1834
  this._scheduleRender({ scene: true, overlay: false });
1833
1835
  } else if (it.kind === "move" || it.kind === "resize") {
1834
- for (const orig of it.originals) this._replaceShape(orig);
1836
+ for (const orig of it.originals) {
1837
+ this._replaceShape(orig);
1838
+ this._markDirty(orig.id);
1839
+ }
1840
+ if (it.kind === "move") this._renderGuides([]);
1835
1841
  this._scheduleRender({ scene: true });
1842
+ } else if (it.kind === "erase") {
1843
+ for (const id of it.erased) this._markDirty(id);
1844
+ this._scheduleRender({ scene: true, overlay: false });
1845
+ } else if (it.kind === "pan") {
1846
+ if (this.canvasEl) this.canvasEl.classList.remove("vd-draw-panning");
1836
1847
  } else if (it.kind === "marquee") {
1837
1848
  clearChildren(this.marqueeLayer);
1838
1849
  }
@@ -2139,6 +2150,7 @@ var VdDraw = class {
2139
2150
  if (it.kind === "pinch") {
2140
2151
  if (this._activePointers.size < 2) {
2141
2152
  this.interaction = null;
2153
+ if (this.canvasEl) this.canvasEl.classList.remove("vd-draw-panning");
2142
2154
  this._emitViewportChange("viewport:pinch");
2143
2155
  }
2144
2156
  return;
@@ -2361,6 +2373,8 @@ var VdDraw = class {
2361
2373
  el = newEl;
2362
2374
  this._shapeElements.set(shape.id, el);
2363
2375
  }
2376
+ const expected = prevEl ? prevEl.nextElementSibling : this.shapesLayer.firstElementChild;
2377
+ if (el !== expected) this.shapesLayer.insertBefore(el, expected);
2364
2378
  prevEl = el;
2365
2379
  }
2366
2380
  this._dirtyShapes.clear();