@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.
@@ -1146,6 +1146,8 @@ var VdDraw = class {
1146
1146
  }
1147
1147
  if (this.toolbarEl) this.toolbarEl.style.display = "";
1148
1148
  if (this.panelEl) this.panelEl.style.display = "";
1149
+ this._syncToolbar();
1150
+ this._syncStylePanel();
1149
1151
  }
1150
1152
  this.render({ scene: false, overlay: true });
1151
1153
  return this;
@@ -1862,8 +1864,17 @@ var VdDraw = class {
1862
1864
  }
1863
1865
  this._scheduleRender({ scene: true, overlay: false });
1864
1866
  } else if (it.kind === "move" || it.kind === "resize") {
1865
- for (const orig of it.originals) this._replaceShape(orig);
1867
+ for (const orig of it.originals) {
1868
+ this._replaceShape(orig);
1869
+ this._markDirty(orig.id);
1870
+ }
1871
+ if (it.kind === "move") this._renderGuides([]);
1866
1872
  this._scheduleRender({ scene: true });
1873
+ } else if (it.kind === "erase") {
1874
+ for (const id of it.erased) this._markDirty(id);
1875
+ this._scheduleRender({ scene: true, overlay: false });
1876
+ } else if (it.kind === "pan") {
1877
+ if (this.canvasEl) this.canvasEl.classList.remove("vd-draw-panning");
1867
1878
  } else if (it.kind === "marquee") {
1868
1879
  clearChildren(this.marqueeLayer);
1869
1880
  }
@@ -2170,6 +2181,7 @@ var VdDraw = class {
2170
2181
  if (it.kind === "pinch") {
2171
2182
  if (this._activePointers.size < 2) {
2172
2183
  this.interaction = null;
2184
+ if (this.canvasEl) this.canvasEl.classList.remove("vd-draw-panning");
2173
2185
  this._emitViewportChange("viewport:pinch");
2174
2186
  }
2175
2187
  return;
@@ -2392,6 +2404,8 @@ var VdDraw = class {
2392
2404
  el = newEl;
2393
2405
  this._shapeElements.set(shape.id, el);
2394
2406
  }
2407
+ const expected = prevEl ? prevEl.nextElementSibling : this.shapesLayer.firstElementChild;
2408
+ if (el !== expected) this.shapesLayer.insertBefore(el, expected);
2395
2409
  prevEl = el;
2396
2410
  }
2397
2411
  this._dirtyShapes.clear();