polarvo-layout 1.0.72 → 1.0.73

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.72",
3
+ "version": "1.0.73",
4
4
  "type": "module",
5
5
  "author": "unigence <unigencelab@gmail.com>",
6
6
  "repository": {
@@ -46,7 +46,6 @@
46
46
  :isHovable="isHovable"
47
47
  class="hover:opacity-80"
48
48
  :class="activeEditMode || isHovable ? `pointer-events-auto ` : `pointer-events-none`"
49
- @set:defaultStyle="setDefaultStyle"
50
49
  />
51
50
  </div>
52
51
  </template>
@@ -101,10 +100,6 @@ function setRef(el) {
101
100
  props.polarvo.components.unregister('elements', `${props.sectionKey}-${props.item.id}`);
102
101
  }
103
102
  }
104
-
105
- function setDefaultStyle(defaultStyle) {
106
- updateActiveElement(props.item.id, { customStyle: defaultStyle });
107
- }
108
103
  </script>
109
104
 
110
105
  <style lang="scss" scoped>
@@ -44,7 +44,6 @@
44
44
  :isHovable="isHovable"
45
45
  class="hover:opacity-80"
46
46
  :class="activeEditMode || isHovable ? `pointer-events-auto ` : `pointer-events-none`"
47
- @set:defaultStyle="setDefaultStyle"
48
47
  />
49
48
  <!-- 오버레이 -->
50
49
  <div v-if="activeEditMode && item.id !== activeId" class="absolute inset-0 bg-black opacity-50 z-30"></div>
@@ -108,8 +107,4 @@ function setRef(el) {
108
107
  props.polarvo.components.unregister('elements', `${props.sectionKey}-${props.item.id}`);
109
108
  }
110
109
  }
111
-
112
- function setDefaultStyle(defaultStyle) {
113
- updateActiveElement(props.item.id, { customStyle: defaultStyle });
114
- }
115
110
  </script>
@@ -201,6 +201,10 @@ class EngineManager {
201
201
  };
202
202
  }
203
203
 
204
+ getElements() {
205
+ return this.state.elements;
206
+ }
207
+
204
208
  /** elements 초기화
205
209
  * @param {Array} elements - 새로운 elements 배열
206
210
  */
@@ -474,14 +478,14 @@ class EngineManager {
474
478
  // };
475
479
  // }
476
480
 
477
- updates.config = {
478
- gridColumns: this.activeData.config?.gridColumns || 2,
479
- gridRows: this.activeData.config?.gridRows || 2,
480
- gridGap: this.activeData.config?.gridGap || 4,
481
- gridRowRatio: this.activeData.config?.gridRowRatio || [],
482
- gridColumnRatio: this.activeData.config?.gridColumnRatio || [],
483
- showGuideLine: this.activeData.config?.showGuideLine || false,
484
- }
481
+ updates.config = {
482
+ gridColumns: this.activeData.config?.gridColumns || 2,
483
+ gridRows: this.activeData.config?.gridRows || 2,
484
+ gridGap: this.activeData.config?.gridGap || 4,
485
+ gridRowRatio: this.activeData.config?.gridRowRatio || [],
486
+ gridColumnRatio: this.activeData.config?.gridColumnRatio || [],
487
+ showGuideLine: this.activeData.config?.showGuideLine || false,
488
+ };
485
489
 
486
490
  this._updateActiveSectionConfig('mode', updates);
487
491
  }
@@ -1033,6 +1037,7 @@ class EngineManager {
1033
1037
  // getLayoutName: () => layoutEngine.layoutName,
1034
1038
  // getActiveData: () => this.activeData,
1035
1039
  // getLayoutData: () => layoutEngine.layoutData,
1040
+ getElements: () => this.getElements(),
1036
1041
  getContainerSize: () => this.getContainerSize(),
1037
1042
  setContainerSize: () => this.setContainerSize(),
1038
1043
 
@@ -171,6 +171,15 @@ function useLayout(api) {
171
171
  };
172
172
 
173
173
  // 메서드
174
+ const getElements =() => {
175
+ try {
176
+ return api.layout.getElements();
177
+ } catch (error) {
178
+ console.warn('[FreeDropLibrary] getElements 실행 중 오류 발생:', error);
179
+ return {};
180
+ }
181
+ };
182
+
174
183
  const getContainerSize = () => {
175
184
  try {
176
185
  return api.layout.getContainerSize();
@@ -255,6 +264,7 @@ function useLayout(api) {
255
264
  return {
256
265
  state: readonly(state),
257
266
  cleanup,
267
+ getElements,
258
268
  getContainerSize,
259
269
  setContainerSize,
260
270
  setLayoutName,