react-sync-board 1.4.6 → 1.4.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.
@@ -198,7 +198,7 @@ var m = Object.create, h = Object.defineProperty, g = Object.getOwnPropertyDescr
198
198
  return e === "grid" ? {
199
199
  width: t,
200
200
  height: t,
201
- centers: [[t / 2, t / 2]]
201
+ centers: [[0, 0]]
202
202
  } : e === "hexH" ? {
203
203
  width: 2 * n,
204
204
  height: 3 * t,
@@ -2618,7 +2618,7 @@ var Rn = ({ children: e }) => e, zn = {}, Bn = {
2618
2618
  let t = new ResizeObserver(e);
2619
2619
  return t.observe(s), () => t.disconnect();
2620
2620
  }, [s]), !c) return null;
2621
- let { type: u, size: d, offset: f, color: p, opacity: m } = t, { width: h, height: g, centers: _ } = ce(t), v = Math.max(360, Math.min(d * 12, 960)), y = n.x + c.width / 2 - v / 2, b = n.y + c.height / 2 - v / 2, x = [];
2621
+ let { type: u, size: d, offset: f, color: p, opacity: m } = t, { width: h, height: g, centers: _ } = ce(t), v = f.x - (u === "grid" ? d / 2 : 0), y = f.y - (u === "grid" ? d / 2 : 0), b = Math.max(360, Math.min(d * 12, 960)), x = n.x + c.width / 2 - b / 2, S = n.y + c.height / 2 - b / 2, C = [];
2622
2622
  if (u !== "grid") {
2623
2623
  let e = u === "hexH" ? Math.PI / 6 : 0;
2624
2624
  for (let t = -1; t <= 1; t++) for (let n = -1; n <= 1; n++) _.forEach(([r, i], o) => {
@@ -2626,19 +2626,19 @@ var Rn = ({ children: e }) => e, zn = {}, Bn = {
2626
2626
  let s = e + o * Math.PI / 3;
2627
2627
  return `${n * h + r + d * Math.cos(s)},${t * g + i + d * Math.sin(s)}`;
2628
2628
  }).join(" ");
2629
- x.push(/* @__PURE__ */ a("polygon", { points: s }, `${t}:${n}:${o}`));
2629
+ C.push(/* @__PURE__ */ a("polygon", { points: s }, `${t}:${n}:${o}`));
2630
2630
  });
2631
2631
  }
2632
2632
  return /* @__PURE__ */ o("svg", {
2633
2633
  "data-grid-item": n.id,
2634
2634
  "data-grid-type": u,
2635
- width: v,
2636
- height: v,
2635
+ width: b,
2636
+ height: b,
2637
2637
  style: {
2638
2638
  position: "absolute",
2639
2639
  left: 0,
2640
2640
  top: 0,
2641
- transform: `translate3d(${y}px, ${b}px, 0)`,
2641
+ transform: `translate3d(${x}px, ${S}px, 0)`,
2642
2642
  willChange: "transform",
2643
2643
  pointerEvents: "none",
2644
2644
  zIndex: n.moving ? ((n.layer ?? 0) + 4) * 10 + 101 : 90,
@@ -2650,13 +2650,13 @@ var Rn = ({ children: e }) => e, zn = {}, Bn = {
2650
2650
  patternUnits: "userSpaceOnUse",
2651
2651
  width: h,
2652
2652
  height: g,
2653
- x: f.x - y,
2654
- y: f.y - b,
2653
+ x: v - x,
2654
+ y: y - S,
2655
2655
  children: /* @__PURE__ */ a("g", {
2656
2656
  fill: "none",
2657
2657
  stroke: p,
2658
2658
  strokeWidth: "1",
2659
- children: u === "grid" ? /* @__PURE__ */ a("path", { d: `M0 ${g}V0H${h}` }) : x
2659
+ children: u === "grid" ? /* @__PURE__ */ a("path", { d: `M0 ${g}V0H${h}` }) : C
2660
2660
  })
2661
2661
  }) }), /* @__PURE__ */ a("rect", {
2662
2662
  width: "100%",