seat-editor 3.5.48 → 3.5.49
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.
|
@@ -389,7 +389,7 @@ const LayerView = (props) => {
|
|
|
389
389
|
y: y - startBox.y,
|
|
390
390
|
};
|
|
391
391
|
const pointerMoveGhost = (ev) => {
|
|
392
|
-
var _a;
|
|
392
|
+
var _a, _b, _c, _d;
|
|
393
393
|
if (allowedDrag) {
|
|
394
394
|
isDragging.current = true;
|
|
395
395
|
const p = svg.createSVGPoint();
|
|
@@ -415,7 +415,8 @@ const LayerView = (props) => {
|
|
|
415
415
|
const findEvent = eventMatchTable === null || eventMatchTable === void 0 ? void 0 : eventMatchTable.find((item) => item.event === "hoverdragontable");
|
|
416
416
|
if (dataHoveredGhostId === hoverUnderghostId.current && findEvent) {
|
|
417
417
|
const allKeyEvent = Object.keys(findEvent.properties);
|
|
418
|
-
const findId = componentsAll === null || componentsAll === void 0 ? void 0 : componentsAll.find((item) => item.id
|
|
418
|
+
const findId = componentsAll === null || componentsAll === void 0 ? void 0 : componentsAll.find((item) => item.id == hoverUnderghostId.current);
|
|
419
|
+
console.log(findId, hoverUnderghostId.current);
|
|
419
420
|
dataBeforeHoverRef.current = allKeyEvent.map((key) => {
|
|
420
421
|
return {
|
|
421
422
|
key,
|
|
@@ -431,6 +432,7 @@ const LayerView = (props) => {
|
|
|
431
432
|
const dataPreview = hoverUnderghostId.current;
|
|
432
433
|
const hoveredBefore = svg.querySelector(`g[data-id="${dataPreview}"]`);
|
|
433
434
|
if (hoveredBefore) {
|
|
435
|
+
(_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("opacity", "0.5");
|
|
434
436
|
dataBeforeHoverRef.current.forEach((item) => {
|
|
435
437
|
var _a, _b, _c;
|
|
436
438
|
(_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);
|
|
@@ -448,7 +450,7 @@ const LayerView = (props) => {
|
|
|
448
450
|
if (dataHoveredGhostId !== dataGhostId) {
|
|
449
451
|
hoverUnderghostId.current = dataHoveredGhostId;
|
|
450
452
|
}
|
|
451
|
-
const posSVG = p.matrixTransform((
|
|
453
|
+
const posSVG = p.matrixTransform((_d = svg.getScreenCTM()) === null || _d === void 0 ? void 0 : _d.inverse());
|
|
452
454
|
// posisi awal ghost di bawah kursor tanpa matrix dulu
|
|
453
455
|
const newX = posSVG.x - offset.x;
|
|
454
456
|
const newY = posSVG.y - offset.y;
|
|
@@ -388,7 +388,7 @@ const LayerView = (props) => {
|
|
|
388
388
|
y: y - startBox.y,
|
|
389
389
|
};
|
|
390
390
|
const pointerMoveGhost = (ev) => {
|
|
391
|
-
var _a;
|
|
391
|
+
var _a, _b, _c, _d;
|
|
392
392
|
if (allowedDrag) {
|
|
393
393
|
isDragging.current = true;
|
|
394
394
|
const p = svg.createSVGPoint();
|
|
@@ -414,7 +414,8 @@ const LayerView = (props) => {
|
|
|
414
414
|
const findEvent = eventMatchTable === null || eventMatchTable === void 0 ? void 0 : eventMatchTable.find((item) => item.event === "hoverdragontable");
|
|
415
415
|
if (dataHoveredGhostId === hoverUnderghostId.current && findEvent) {
|
|
416
416
|
const allKeyEvent = Object.keys(findEvent.properties);
|
|
417
|
-
const findId = componentsAll === null || componentsAll === void 0 ? void 0 : componentsAll.find((item) => item.id
|
|
417
|
+
const findId = componentsAll === null || componentsAll === void 0 ? void 0 : componentsAll.find((item) => item.id == hoverUnderghostId.current);
|
|
418
|
+
console.log(findId, hoverUnderghostId.current);
|
|
418
419
|
dataBeforeHoverRef.current = allKeyEvent.map((key) => {
|
|
419
420
|
return {
|
|
420
421
|
key,
|
|
@@ -430,6 +431,7 @@ const LayerView = (props) => {
|
|
|
430
431
|
const dataPreview = hoverUnderghostId.current;
|
|
431
432
|
const hoveredBefore = svg.querySelector(`g[data-id="${dataPreview}"]`);
|
|
432
433
|
if (hoveredBefore) {
|
|
434
|
+
(_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("opacity", "0.5");
|
|
433
435
|
dataBeforeHoverRef.current.forEach((item) => {
|
|
434
436
|
var _a, _b, _c;
|
|
435
437
|
(_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);
|
|
@@ -447,7 +449,7 @@ const LayerView = (props) => {
|
|
|
447
449
|
if (dataHoveredGhostId !== dataGhostId) {
|
|
448
450
|
hoverUnderghostId.current = dataHoveredGhostId;
|
|
449
451
|
}
|
|
450
|
-
const posSVG = p.matrixTransform((
|
|
452
|
+
const posSVG = p.matrixTransform((_d = svg.getScreenCTM()) === null || _d === void 0 ? void 0 : _d.inverse());
|
|
451
453
|
// posisi awal ghost di bawah kursor tanpa matrix dulu
|
|
452
454
|
const newX = posSVG.x - offset.x;
|
|
453
455
|
const newY = posSVG.y - offset.y;
|