seat-editor 3.5.47 → 3.5.48
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.
|
@@ -332,6 +332,10 @@ const LayerView = (props) => {
|
|
|
332
332
|
const clickTimerRef = useRef(null);
|
|
333
333
|
const ignoreNextRef = useRef(false);
|
|
334
334
|
const DOUBLE_DELAY = 250;
|
|
335
|
+
const componentsAll = [
|
|
336
|
+
...extraComponentsEditor,
|
|
337
|
+
...renderElements(componentsEditor, mappingKey, tableMatchKey),
|
|
338
|
+
];
|
|
335
339
|
const handlePointerDown = (e) => {
|
|
336
340
|
var _a;
|
|
337
341
|
const svg = svgRef.current;
|
|
@@ -411,10 +415,11 @@ const LayerView = (props) => {
|
|
|
411
415
|
const findEvent = eventMatchTable === null || eventMatchTable === void 0 ? void 0 : eventMatchTable.find((item) => item.event === "hoverdragontable");
|
|
412
416
|
if (dataHoveredGhostId === hoverUnderghostId.current && findEvent) {
|
|
413
417
|
const allKeyEvent = Object.keys(findEvent.properties);
|
|
418
|
+
const findId = componentsAll === null || componentsAll === void 0 ? void 0 : componentsAll.find((item) => item.id === hoverUnderghostId.current);
|
|
414
419
|
dataBeforeHoverRef.current = allKeyEvent.map((key) => {
|
|
415
420
|
return {
|
|
416
421
|
key,
|
|
417
|
-
value:
|
|
422
|
+
value: findId === null || findId === void 0 ? void 0 : findId[key]
|
|
418
423
|
};
|
|
419
424
|
});
|
|
420
425
|
Object.entries(findEvent.properties).forEach(([key, value]) => {
|
|
@@ -426,7 +431,6 @@ const LayerView = (props) => {
|
|
|
426
431
|
const dataPreview = hoverUnderghostId.current;
|
|
427
432
|
const hoveredBefore = svg.querySelector(`g[data-id="${dataPreview}"]`);
|
|
428
433
|
if (hoveredBefore) {
|
|
429
|
-
// console.log((hoveredBefore.firstChild as Element)?.children)
|
|
430
434
|
dataBeforeHoverRef.current.forEach((item) => {
|
|
431
435
|
var _a, _b, _c;
|
|
432
436
|
(_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);
|
|
@@ -676,9 +680,6 @@ const LayerView = (props) => {
|
|
|
676
680
|
// pointerEvents: disabled ? "none" : "all",
|
|
677
681
|
touchAction: "none",
|
|
678
682
|
userSelect: "none",
|
|
679
|
-
} }, props.svgProps, { children: [hasBoundingBox && (_jsx("defs", { children: _jsx("clipPath", { id: "contentCrop", children: _jsx("rect", { x: boundingBox.minX, y: boundingBox.minY, width: boundingBox.width, height: boundingBox.height }) }) })), _jsx("g", { id: "main-layer", clipPath: "url(#contentCrop)", children: _jsx(Layers, { components:
|
|
680
|
-
...extraComponentsEditor,
|
|
681
|
-
...renderElements(componentsEditor, mappingKey, tableMatchKey),
|
|
682
|
-
], selectedTable: selectedTable, iconTags: iconTags, eventMatchTable: eventMatchTable, privilegedTags: privilegedTags }) })] })), tooltip.visible && (_jsx("div", { className: `seat-editor tooltip-container ${tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.className}`, style: Object.assign({ top: tooltip.y, left: tooltip.x, transform: `scale(${1 / scale})`, transformOrigin: "top left", minWidth: widthTooltip + "px" }, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.style), children: tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.children }))] }) }))] })));
|
|
683
|
+
} }, props.svgProps, { children: [hasBoundingBox && (_jsx("defs", { children: _jsx("clipPath", { id: "contentCrop", children: _jsx("rect", { x: boundingBox.minX, y: boundingBox.minY, width: boundingBox.width, height: boundingBox.height }) }) })), _jsx("g", { id: "main-layer", clipPath: "url(#contentCrop)", children: _jsx(Layers, { components: componentsAll, selectedTable: selectedTable, iconTags: iconTags, eventMatchTable: eventMatchTable, privilegedTags: privilegedTags }) })] })), tooltip.visible && (_jsx("div", { className: `seat-editor tooltip-container ${tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.className}`, style: Object.assign({ top: tooltip.y, left: tooltip.x, transform: `scale(${1 / scale})`, transformOrigin: "top left", minWidth: widthTooltip + "px" }, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.style), children: tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.children }))] }) }))] })));
|
|
683
684
|
};
|
|
684
685
|
export default LayerView;
|
|
@@ -331,6 +331,10 @@ const LayerView = (props) => {
|
|
|
331
331
|
const clickTimerRef = useRef(null);
|
|
332
332
|
const ignoreNextRef = useRef(false);
|
|
333
333
|
const DOUBLE_DELAY = 250;
|
|
334
|
+
const componentsAll = [
|
|
335
|
+
...extraComponentsEditor,
|
|
336
|
+
...renderElements(componentsEditor, mappingKey, tableMatchKey),
|
|
337
|
+
];
|
|
334
338
|
const handlePointerDown = (e) => {
|
|
335
339
|
var _a;
|
|
336
340
|
const svg = svgRef.current;
|
|
@@ -410,10 +414,11 @@ const LayerView = (props) => {
|
|
|
410
414
|
const findEvent = eventMatchTable === null || eventMatchTable === void 0 ? void 0 : eventMatchTable.find((item) => item.event === "hoverdragontable");
|
|
411
415
|
if (dataHoveredGhostId === hoverUnderghostId.current && findEvent) {
|
|
412
416
|
const allKeyEvent = Object.keys(findEvent.properties);
|
|
417
|
+
const findId = componentsAll === null || componentsAll === void 0 ? void 0 : componentsAll.find((item) => item.id === hoverUnderghostId.current);
|
|
413
418
|
dataBeforeHoverRef.current = allKeyEvent.map((key) => {
|
|
414
419
|
return {
|
|
415
420
|
key,
|
|
416
|
-
value:
|
|
421
|
+
value: findId === null || findId === void 0 ? void 0 : findId[key]
|
|
417
422
|
};
|
|
418
423
|
});
|
|
419
424
|
Object.entries(findEvent.properties).forEach(([key, value]) => {
|
|
@@ -425,7 +430,6 @@ const LayerView = (props) => {
|
|
|
425
430
|
const dataPreview = hoverUnderghostId.current;
|
|
426
431
|
const hoveredBefore = svg.querySelector(`g[data-id="${dataPreview}"]`);
|
|
427
432
|
if (hoveredBefore) {
|
|
428
|
-
// console.log((hoveredBefore.firstChild as Element)?.children)
|
|
429
433
|
dataBeforeHoverRef.current.forEach((item) => {
|
|
430
434
|
var _a, _b, _c;
|
|
431
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(item.key, item.value);
|
|
@@ -695,10 +699,7 @@ const LayerView = (props) => {
|
|
|
695
699
|
</clipPath>
|
|
696
700
|
</defs>)}
|
|
697
701
|
<g id="main-layer" clipPath="url(#contentCrop)">
|
|
698
|
-
<Layers components={
|
|
699
|
-
...extraComponentsEditor,
|
|
700
|
-
...renderElements(componentsEditor, mappingKey, tableMatchKey),
|
|
701
|
-
]} selectedTable={selectedTable} iconTags={iconTags} eventMatchTable={eventMatchTable} privilegedTags={privilegedTags}/>
|
|
702
|
+
<Layers components={componentsAll} selectedTable={selectedTable} iconTags={iconTags} eventMatchTable={eventMatchTable} privilegedTags={privilegedTags}/>
|
|
702
703
|
</g>
|
|
703
704
|
{/* 🧠 Ghost universal */}
|
|
704
705
|
</svg>
|