polarvo-layout 1.0.60 → 1.0.62
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,12 +69,14 @@ 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) {
|
|
80
82
|
setActiveDesign(null);
|
|
@@ -99,6 +101,8 @@ watch(
|
|
|
99
101
|
_isElementSwitching = false;
|
|
100
102
|
return;
|
|
101
103
|
}
|
|
104
|
+
// 이 섹션이 담당하는 activeElement가 아니면 무시
|
|
105
|
+
if (activeElement.value?.section !== props.sectionKey) return;
|
|
102
106
|
updateActiveElement(selectedElement.value?.id, newElement);
|
|
103
107
|
},
|
|
104
108
|
{ deep: true },
|
|
@@ -108,6 +112,7 @@ watch(
|
|
|
108
112
|
() => activeDesign.value,
|
|
109
113
|
(newDesign, oldDesign) => {
|
|
110
114
|
if (newDesign != null || oldDesign == null) return; // null → null이 아닌 값으로 닫히는(값이 있다가 null 되는) 경우만
|
|
115
|
+
if (activeElement.value?.section !== props.sectionKey) return;
|
|
111
116
|
|
|
112
117
|
if (activeElement.value?.id && !activeElement.value.id.includes('inputForm')) {
|
|
113
118
|
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,7 @@ 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;
|
|
368
374
|
|
|
369
375
|
if (activeElement.value?.id && !activeElement.value.id.includes('inputForm')) {
|
|
370
376
|
updateActiveElement(activeElement.value.id, selectedElementForWatch.value, true);
|
|
@@ -445,8 +445,8 @@ class FreeDropEngine {
|
|
|
445
445
|
* @param {string|null} action - 액션 종류 (예: 'add')
|
|
446
446
|
*/
|
|
447
447
|
setActiveElement(element, action = null) {
|
|
448
|
-
// 이미 활성화된 요소를 다시 활성화하려는 경우 무시
|
|
449
|
-
if (element && this._activeElement?.id === element?.id) return;
|
|
448
|
+
// 이미 활성화된 요소를 다시 활성화하려는 경우 무시 (단, 속성이 갱신된 경우는 제외)
|
|
449
|
+
if (action !== 'update' && element && this._activeElement?.id === element?.id) return;
|
|
450
450
|
|
|
451
451
|
this._activeElement = element;
|
|
452
452
|
this._alreadyExist = action === 'add' ? false : true;
|
|
@@ -222,8 +222,8 @@ class GridDropEngine {
|
|
|
222
222
|
* @param {string|null} action - 변경 액션 (예: 'click', 'reset' 등)
|
|
223
223
|
*/
|
|
224
224
|
setActiveElement(element, action = null) {
|
|
225
|
-
// 이미 활성화된 요소를 다시 활성화하려는 경우 무시
|
|
226
|
-
if (element && this._activeElement?.id === element?.id) return;
|
|
225
|
+
// 이미 활성화된 요소를 다시 활성화하려는 경우 무시 (단, 속성이 갱신된 경우는 제외)
|
|
226
|
+
if (action !== 'update' && element && this._activeElement?.id === element?.id) return;
|
|
227
227
|
|
|
228
228
|
this._activeElement = element;
|
|
229
229
|
this._elementsUpdate = true;
|
|
@@ -333,6 +333,7 @@ class EngineManager {
|
|
|
333
333
|
|
|
334
334
|
const prevGridRatio = $prev?.gridRatio || { column: [100], row: [100] };
|
|
335
335
|
this._updateElementsScaleByRatio('column', prevGridRatio, $gridRatio);
|
|
336
|
+
this._updateElementsScaleByRatio('row', prevGridRatio, $gridRatio);
|
|
336
337
|
|
|
337
338
|
nextTick(() => {
|
|
338
339
|
this.eventBus.emit('system:historyCheckpoint', {
|