@tmagic/stage 1.0.0-beta.6 → 1.0.0-beta.7

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.
@@ -249,9 +249,10 @@
249
249
  const { renderer } = this.core;
250
250
  const getSnapElements = (await renderer.getRuntime())?.getSnapElements || (() => {
251
251
  const doc = renderer.contentWindow?.document;
252
- return doc ? Array.from(doc.querySelectorAll("[id]")) : [];
252
+ const elementGuidelines = (doc ? Array.from(doc.querySelectorAll("[id]")) : []).filter((element) => element !== this.target && !this.target?.contains(element));
253
+ return elementGuidelines;
253
254
  });
254
- return getSnapElements(el).filter((element) => element !== this.target && !this.target?.contains(element));
255
+ return getSnapElements(el);
255
256
  }
256
257
  sort() {
257
258
  if (!this.target || !this.ghostEl)
@@ -331,8 +332,8 @@
331
332
  resizable: true,
332
333
  snappable: !isSortable,
333
334
  snapGap: !isSortable,
334
- snapDirections: { center: !isSortable, middle: !isSortable },
335
- elementSnapDirections: { center: !isSortable, middle: !isSortable },
335
+ snapCenter: !isSortable,
336
+ container: renderer.contentWindow?.document.body,
336
337
  elementGuidelines: isSortable ? [] : await this.getSnapElements(this.target),
337
338
  horizontalGuidelines: this.horizontalGuidelines,
338
339
  verticalGuidelines: this.verticalGuidelines,