polarvo-layout 1.0.61 → 1.0.63
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.
package/package.json
CHANGED
|
@@ -69,14 +69,17 @@ const selectedElement = inject('selectedElement');
|
|
|
69
69
|
const activeEditMode = inject('activeEditMode');
|
|
70
70
|
|
|
71
71
|
let _isElementSwitching = false;
|
|
72
|
-
import { omit, cloneDeep
|
|
72
|
+
import { omit, cloneDeep } from 'lodash-es';
|
|
73
73
|
|
|
74
74
|
watch(
|
|
75
75
|
() => activeElement.value?.id,
|
|
76
76
|
(newId, oldId) => {
|
|
77
77
|
if (newId === oldId) return;
|
|
78
|
+
// activeElement가 이 섹션 소속이 아니면 무시 (activeElement/selectedElement는 전역 공유 상태라 섹션마다 인스턴스가 따로 반응함)
|
|
79
|
+
if (newId && activeElement.value?.section !== props.sectionKey) return;
|
|
78
80
|
|
|
79
81
|
if (!newId) {
|
|
82
|
+
console.l
|
|
80
83
|
setActiveDesign(null);
|
|
81
84
|
setActiveMenu(null);
|
|
82
85
|
}
|
|
@@ -99,6 +102,8 @@ watch(
|
|
|
99
102
|
_isElementSwitching = false;
|
|
100
103
|
return;
|
|
101
104
|
}
|
|
105
|
+
// 이 섹션이 담당하는 activeElement가 아니면 무시
|
|
106
|
+
if (activeElement.value?.section !== props.sectionKey) return;
|
|
102
107
|
updateActiveElement(selectedElement.value?.id, newElement);
|
|
103
108
|
},
|
|
104
109
|
{ deep: true },
|
|
@@ -108,6 +113,9 @@ watch(
|
|
|
108
113
|
() => activeDesign.value,
|
|
109
114
|
(newDesign, oldDesign) => {
|
|
110
115
|
if (newDesign != null || oldDesign == null) return; // null → null이 아닌 값으로 닫히는(값이 있다가 null 되는) 경우만
|
|
116
|
+
if (activeElement.value?.section !== props.sectionKey) return;
|
|
117
|
+
// selectedElement가 아직 activeElement로 갱신되기 전(요소 전환 레이스)이면 저장하지 않음
|
|
118
|
+
if (selectedElement.value?.id !== activeElement.value?.id) return;
|
|
111
119
|
|
|
112
120
|
if (activeElement.value?.id && !activeElement.value.id.includes('inputForm')) {
|
|
113
121
|
updateActiveElement(activeElement.value.id, selectedElementForWatch.value, true);
|
|
@@ -333,6 +333,9 @@ watch(
|
|
|
333
333
|
() => activeElement.value?.id,
|
|
334
334
|
(newId, oldId) => {
|
|
335
335
|
if (newId === oldId) return;
|
|
336
|
+
// activeElement가 이 섹션 소속이 아니면 무시 (activeElement/selectedElement는 전역 공유 상태라 섹션마다 인스턴스가 따로 반응함)
|
|
337
|
+
if (newId && activeElement.value?.section !== props.sectionKey) return;
|
|
338
|
+
|
|
336
339
|
if (!newId) {
|
|
337
340
|
setActiveDesign(null);
|
|
338
341
|
}
|
|
@@ -356,6 +359,8 @@ watch(
|
|
|
356
359
|
_isElementSwitching = false;
|
|
357
360
|
return;
|
|
358
361
|
}
|
|
362
|
+
// 이 섹션이 담당하는 activeElement가 아니면 무시
|
|
363
|
+
if (activeElement.value?.section !== props.sectionKey) return;
|
|
359
364
|
updateActiveElement(selectedElement.value?.id, newElement);
|
|
360
365
|
},
|
|
361
366
|
{ deep: true },
|
|
@@ -365,6 +370,9 @@ watch(
|
|
|
365
370
|
() => activeDesign.value,
|
|
366
371
|
(newDesign, oldDesign) => {
|
|
367
372
|
if (newDesign != null || oldDesign == null) return; // null → null이 아닌 값으로 닫히는(값이 있다가 null 되는) 경우만
|
|
373
|
+
if (activeElement.value?.section !== props.sectionKey) return;
|
|
374
|
+
// selectedElement가 아직 activeElement로 갱신되기 전(요소 전환 레이스)이면 저장하지 않음
|
|
375
|
+
if (selectedElement.value?.id !== activeElement.value?.id) return;
|
|
368
376
|
|
|
369
377
|
if (activeElement.value?.id && !activeElement.value.id.includes('inputForm')) {
|
|
370
378
|
updateActiveElement(activeElement.value.id, selectedElementForWatch.value, true);
|
|
@@ -61,7 +61,8 @@ class DisplayEngine {
|
|
|
61
61
|
this.displaySize = { ...$screenConfig.displaySize };
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
-
this._subscribe('freeDrop:setActiveElement', () => {
|
|
64
|
+
this._subscribe('freeDrop:setActiveElement', ({ action }) => {
|
|
65
|
+
if (action === 'update') return;
|
|
65
66
|
this.setActiveMenu(null);
|
|
66
67
|
this.setActiveDesign(null);
|
|
67
68
|
});
|
|
@@ -445,7 +445,7 @@ class FreeDropEngine {
|
|
|
445
445
|
* @param {string|null} action - 액션 종류 (예: 'add')
|
|
446
446
|
*/
|
|
447
447
|
setActiveElement(element, action = null) {
|
|
448
|
-
// 이미 활성화된 요소를 다시 활성화하려는 경우 무시
|
|
448
|
+
// 이미 활성화된 요소를 다시 활성화하려는 경우 무시 (단, 속성이 갱신된 경우는 제외)
|
|
449
449
|
if (element && this._activeElement?.id === element?.id) return;
|
|
450
450
|
|
|
451
451
|
this._activeElement = element;
|
|
@@ -453,6 +453,7 @@ class FreeDropEngine {
|
|
|
453
453
|
// this._elementsUpdate = true;
|
|
454
454
|
|
|
455
455
|
this.eventBus.emit('freeDrop:setActiveElement', {
|
|
456
|
+
action: action,
|
|
456
457
|
$alreadyExist: this._alreadyExist,
|
|
457
458
|
activeElement: this._activeElement,
|
|
458
459
|
timestamp: Date.now(),
|
|
@@ -222,7 +222,7 @@ class GridDropEngine {
|
|
|
222
222
|
* @param {string|null} action - 변경 액션 (예: 'click', 'reset' 등)
|
|
223
223
|
*/
|
|
224
224
|
setActiveElement(element, action = null) {
|
|
225
|
-
// 이미 활성화된 요소를 다시 활성화하려는 경우 무시
|
|
225
|
+
// 이미 활성화된 요소를 다시 활성화하려는 경우 무시 (단, 속성이 갱신된 경우는 제외)
|
|
226
226
|
if (element && this._activeElement?.id === element?.id) return;
|
|
227
227
|
|
|
228
228
|
this._activeElement = element;
|