polarvo-layout 1.0.62 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polarvo-layout",
3
- "version": "1.0.62",
3
+ "version": "1.0.63",
4
4
  "type": "module",
5
5
  "author": "unigence <unigencelab@gmail.com>",
6
6
  "repository": {
@@ -79,6 +79,7 @@ watch(
79
79
  if (newId && activeElement.value?.section !== props.sectionKey) return;
80
80
 
81
81
  if (!newId) {
82
+ console.l
82
83
  setActiveDesign(null);
83
84
  setActiveMenu(null);
84
85
  }
@@ -113,6 +114,8 @@ watch(
113
114
  (newDesign, oldDesign) => {
114
115
  if (newDesign != null || oldDesign == null) return; // null → null이 아닌 값으로 닫히는(값이 있다가 null 되는) 경우만
115
116
  if (activeElement.value?.section !== props.sectionKey) return;
117
+ // selectedElement가 아직 activeElement로 갱신되기 전(요소 전환 레이스)이면 저장하지 않음
118
+ if (selectedElement.value?.id !== activeElement.value?.id) return;
116
119
 
117
120
  if (activeElement.value?.id && !activeElement.value.id.includes('inputForm')) {
118
121
  updateActiveElement(activeElement.value.id, selectedElementForWatch.value, true);
@@ -371,6 +371,8 @@ watch(
371
371
  (newDesign, oldDesign) => {
372
372
  if (newDesign != null || oldDesign == null) return; // null → null이 아닌 값으로 닫히는(값이 있다가 null 되는) 경우만
373
373
  if (activeElement.value?.section !== props.sectionKey) return;
374
+ // selectedElement가 아직 activeElement로 갱신되기 전(요소 전환 레이스)이면 저장하지 않음
375
+ if (selectedElement.value?.id !== activeElement.value?.id) return;
374
376
 
375
377
  if (activeElement.value?.id && !activeElement.value.id.includes('inputForm')) {
376
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
  });
@@ -446,13 +446,14 @@ class FreeDropEngine {
446
446
  */
447
447
  setActiveElement(element, action = null) {
448
448
  // 이미 활성화된 요소를 다시 활성화하려는 경우 무시 (단, 속성이 갱신된 경우는 제외)
449
- if (action !== 'update' && element && this._activeElement?.id === element?.id) return;
449
+ if (element && this._activeElement?.id === element?.id) return;
450
450
 
451
451
  this._activeElement = element;
452
452
  this._alreadyExist = action === 'add' ? false : true;
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(),
@@ -223,7 +223,7 @@ class GridDropEngine {
223
223
  */
224
224
  setActiveElement(element, action = null) {
225
225
  // 이미 활성화된 요소를 다시 활성화하려는 경우 무시 (단, 속성이 갱신된 경우는 제외)
226
- if (action !== 'update' && element && this._activeElement?.id === element?.id) return;
226
+ if (element && this._activeElement?.id === element?.id) return;
227
227
 
228
228
  this._activeElement = element;
229
229
  this._elementsUpdate = true;