polarvo-layout 1.0.73 → 1.0.75

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.73",
3
+ "version": "1.0.75",
4
4
  "type": "module",
5
5
  "author": "unigence <unigencelab@gmail.com>",
6
6
  "repository": {
@@ -201,9 +201,6 @@ class EngineManager {
201
201
  };
202
202
  }
203
203
 
204
- getElements() {
205
- return this.state.elements;
206
- }
207
204
 
208
205
  /** elements 초기화
209
206
  * @param {Array} elements - 새로운 elements 배열
@@ -1037,7 +1034,6 @@ class EngineManager {
1037
1034
  // getLayoutName: () => layoutEngine.layoutName,
1038
1035
  // getActiveData: () => this.activeData,
1039
1036
  // getLayoutData: () => layoutEngine.layoutData,
1040
- getElements: () => this.getElements(),
1041
1037
  getContainerSize: () => this.getContainerSize(),
1042
1038
  setContainerSize: () => this.setContainerSize(),
1043
1039
 
@@ -93,7 +93,7 @@ function useLayout(api) {
93
93
  _subscribe('system:requestUpdateActiveElement', ({ elementId, element }) => {
94
94
  const index = state.elements.findIndex((x) => x.id === elementId);
95
95
  if (index !== -1) {
96
- state.elements[index] = element; // 업데이트
96
+ state.elements = [...state.elements.slice(0, index), element, ...state.elements.slice(index + 1)]; // 배열 자체를 교체하여 갱신
97
97
  }
98
98
  });
99
99
 
@@ -171,15 +171,6 @@ 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
-
183
174
  const getContainerSize = () => {
184
175
  try {
185
176
  return api.layout.getContainerSize();
@@ -264,7 +255,6 @@ function useLayout(api) {
264
255
  return {
265
256
  state: readonly(state),
266
257
  cleanup,
267
- getElements,
268
258
  getContainerSize,
269
259
  setContainerSize,
270
260
  setLayoutName,