seat-editor 3.5.46 → 3.5.47

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.
@@ -199,6 +199,7 @@ const TouchScrollDetect = () => {
199
199
  properties: {
200
200
  strokeWidth: 5,
201
201
  filter: "drop-shadow(0px 0px 5px red)",
202
+ opacity: 1
202
203
  },
203
204
  },
204
205
  {
@@ -206,6 +207,7 @@ const TouchScrollDetect = () => {
206
207
  properties: {
207
208
  strokeWidth: 5,
208
209
  filter: "drop-shadow(0px 0px 5px red)",
210
+ opacity: 1
209
211
  },
210
212
  },
211
213
  // {
@@ -223,6 +223,7 @@ const TouchScrollDetect = () => {
223
223
  properties: {
224
224
  strokeWidth: 5,
225
225
  filter: "drop-shadow(0px 0px 5px red)",
226
+ opacity: 1
226
227
  },
227
228
  },
228
229
  {
@@ -230,6 +231,7 @@ const TouchScrollDetect = () => {
230
231
  properties: {
231
232
  strokeWidth: 5,
232
233
  filter: "drop-shadow(0px 0px 5px red)",
234
+ opacity: 1
233
235
  },
234
236
  },
235
237
  // {
@@ -385,7 +385,7 @@ const LayerView = (props) => {
385
385
  y: y - startBox.y,
386
386
  };
387
387
  const pointerMoveGhost = (ev) => {
388
- var _a, _b;
388
+ var _a;
389
389
  if (allowedDrag) {
390
390
  isDragging.current = true;
391
391
  const p = svg.createSVGPoint();
@@ -411,7 +411,7 @@ const LayerView = (props) => {
411
411
  const findEvent = eventMatchTable === null || eventMatchTable === void 0 ? void 0 : eventMatchTable.find((item) => item.event === "hoverdragontable");
412
412
  if (dataHoveredGhostId === hoverUnderghostId.current && findEvent) {
413
413
  const allKeyEvent = Object.keys(findEvent.properties);
414
- dataBeforeHoveredUnderGhost = allKeyEvent.map((key) => {
414
+ dataBeforeHoverRef.current = allKeyEvent.map((key) => {
415
415
  return {
416
416
  key,
417
417
  value: hoveredGroup === null || hoveredGroup === void 0 ? void 0 : hoveredGroup.getAttribute(key)
@@ -426,15 +426,14 @@ const LayerView = (props) => {
426
426
  const dataPreview = hoverUnderghostId.current;
427
427
  const hoveredBefore = svg.querySelector(`g[data-id="${dataPreview}"]`);
428
428
  if (hoveredBefore) {
429
- console.log((_a = hoveredBefore.firstChild) === null || _a === void 0 ? void 0 : _a.children);
430
- dataBeforeHoveredUnderGhost.forEach((item) => {
429
+ // console.log((hoveredBefore.firstChild as Element)?.children)
430
+ dataBeforeHoverRef.current.forEach((item) => {
431
431
  var _a, _b, _c;
432
432
  (_c = (_b = (_a = hoveredBefore.firstChild) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.setAttribute(item.key, item.value);
433
433
  });
434
434
  }
435
435
  }
436
436
  if (findEvent && targetGroup) {
437
- // console
438
437
  const idTarget = JSON.parse(targetGroup.getAttribute("data-id") || "{}");
439
438
  const targetElement = svg.querySelector(`g[data-id="${idTarget}"]`);
440
439
  Object.entries(findEvent.properties).forEach(([key, value]) => {
@@ -445,7 +444,7 @@ const LayerView = (props) => {
445
444
  if (dataHoveredGhostId !== dataGhostId) {
446
445
  hoverUnderghostId.current = dataHoveredGhostId;
447
446
  }
448
- const posSVG = p.matrixTransform((_b = svg.getScreenCTM()) === null || _b === void 0 ? void 0 : _b.inverse());
447
+ const posSVG = p.matrixTransform((_a = svg.getScreenCTM()) === null || _a === void 0 ? void 0 : _a.inverse());
449
448
  // posisi awal ghost di bawah kursor tanpa matrix dulu
450
449
  const newX = posSVG.x - offset.x;
451
450
  const newY = posSVG.y - offset.y;
@@ -384,7 +384,7 @@ const LayerView = (props) => {
384
384
  y: y - startBox.y,
385
385
  };
386
386
  const pointerMoveGhost = (ev) => {
387
- var _a, _b;
387
+ var _a;
388
388
  if (allowedDrag) {
389
389
  isDragging.current = true;
390
390
  const p = svg.createSVGPoint();
@@ -410,7 +410,7 @@ const LayerView = (props) => {
410
410
  const findEvent = eventMatchTable === null || eventMatchTable === void 0 ? void 0 : eventMatchTable.find((item) => item.event === "hoverdragontable");
411
411
  if (dataHoveredGhostId === hoverUnderghostId.current && findEvent) {
412
412
  const allKeyEvent = Object.keys(findEvent.properties);
413
- dataBeforeHoveredUnderGhost = allKeyEvent.map((key) => {
413
+ dataBeforeHoverRef.current = allKeyEvent.map((key) => {
414
414
  return {
415
415
  key,
416
416
  value: hoveredGroup === null || hoveredGroup === void 0 ? void 0 : hoveredGroup.getAttribute(key)
@@ -425,15 +425,14 @@ const LayerView = (props) => {
425
425
  const dataPreview = hoverUnderghostId.current;
426
426
  const hoveredBefore = svg.querySelector(`g[data-id="${dataPreview}"]`);
427
427
  if (hoveredBefore) {
428
- console.log((_a = hoveredBefore.firstChild) === null || _a === void 0 ? void 0 : _a.children);
429
- dataBeforeHoveredUnderGhost.forEach((item) => {
428
+ // console.log((hoveredBefore.firstChild as Element)?.children)
429
+ dataBeforeHoverRef.current.forEach((item) => {
430
430
  var _a, _b, _c;
431
431
  (_c = (_b = (_a = hoveredBefore.firstChild) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.setAttribute(item.key, item.value);
432
432
  });
433
433
  }
434
434
  }
435
435
  if (findEvent && targetGroup) {
436
- // console
437
436
  const idTarget = JSON.parse(targetGroup.getAttribute("data-id") || "{}");
438
437
  const targetElement = svg.querySelector(`g[data-id="${idTarget}"]`);
439
438
  Object.entries(findEvent.properties).forEach(([key, value]) => {
@@ -444,7 +443,7 @@ const LayerView = (props) => {
444
443
  if (dataHoveredGhostId !== dataGhostId) {
445
444
  hoverUnderghostId.current = dataHoveredGhostId;
446
445
  }
447
- const posSVG = p.matrixTransform((_b = svg.getScreenCTM()) === null || _b === void 0 ? void 0 : _b.inverse());
446
+ const posSVG = p.matrixTransform((_a = svg.getScreenCTM()) === null || _a === void 0 ? void 0 : _a.inverse());
448
447
  // posisi awal ghost di bawah kursor tanpa matrix dulu
449
448
  const newX = posSVG.x - offset.x;
450
449
  const newY = posSVG.y - offset.y;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.5.46",
3
+ "version": "3.5.47",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",