polarvo-layout 1.0.39 → 1.0.41

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.39",
3
+ "version": "1.0.41",
4
4
  "type": "module",
5
5
  "author": "unigence <unigencelab@gmail.com>",
6
6
  "repository": {
@@ -41,7 +41,7 @@ async function saveSetting() {
41
41
  const finalElements = elements.value.filter((el) => elementIdsTotal.includes(el.id));
42
42
 
43
43
  const { width, height } = containerSize.value || { width: 1920, height: 1080 };
44
-
44
+
45
45
  // 요소 데이터 정규화
46
46
  const normalizedElements = dataConverter.normalize(finalElements, width, height);
47
47
 
@@ -13,7 +13,7 @@
13
13
  </template>
14
14
 
15
15
  <script setup>
16
- import { toRefs, ref, computed, watch } from 'vue';
16
+ import { toRefs, ref, computed, watch, onMounted } from 'vue';
17
17
  import BaseLayout from './BaseLayout.vue';
18
18
 
19
19
  const props = defineProps({
@@ -45,7 +45,10 @@ const defaultHeight = computed(() => {
45
45
  watch(
46
46
  () => defaultHeight.value,
47
47
  (newHeight, oldHeight) => {
48
- if (newHeight <= oldHeight) return;
48
+ if (newHeight <= oldHeight) {
49
+ additionalHeight.value = 0;
50
+ return;
51
+ }
49
52
  additionalHeight.value = 200;
50
53
  },
51
54
  );
@@ -59,7 +59,6 @@ async function getElements() {
59
59
  'labelInput',
60
60
  'labelSelect',
61
61
  'dataList',
62
- 'loginForm',
63
62
  'multiCheckRadio',
64
63
  'labelInputRows',
65
64
  'refLabel',
@@ -177,10 +177,12 @@ class EngineManager {
177
177
  console.warn('[EngineManager] baseLayout 요소를 찾을 수 없습니다.');
178
178
  return false;
179
179
  }
180
+
180
181
  const { width, height } = containerEl.getBoundingClientRect();
182
+ const newHeight = width / calculateAspectRatio(this._displaySize.aspectRatio);
181
183
 
182
184
  this._containerWidth = width ?? this._containerWidth;
183
- this._containerHeight = height ?? this._containerHeight;
185
+ this._containerHeight = newHeight ?? this._containerHeight;
184
186
  } catch (error) {
185
187
  console.error('[EngineManager] 컨테이너 크기 설정 중 오류 발생: ', error);
186
188
  return false;
@@ -657,7 +659,8 @@ class EngineManager {
657
659
  // 세션 복원
658
660
  const saved = sessionStorage.getItem('polarvo-session');
659
661
  if (saved) {
660
- this.restoreState('draft', JSON.parse(saved));
662
+ const savedDraft = JSON.parse(saved);
663
+ this.restoreState('draft', savedDraft);
661
664
 
662
665
  this.eventBus.emit('system:historyCheckpoint', {
663
666
  domain: 'draft',
@@ -689,6 +692,7 @@ class EngineManager {
689
692
  import('../engines/GridDropEngine.js'),
690
693
  import('../engines/HistoryEngine.js'),
691
694
  ]);
695
+
692
696
  this.addEngine('display', DisplayEngine, {
693
697
  eventBus: this.eventBus,
694
698
  options: {
@@ -855,6 +859,9 @@ class EngineManager {
855
859
  resetEngines() {
856
860
  console.log('[EngineManager] 엔진 초기화 시작');
857
861
 
862
+ sessionStorage.removeItem('polarvo-screen'); // 화면 설정 초기화
863
+ sessionStorage.removeItem('polarvo-session'); // 세션 스토리지 초기화 (새로고침 시 이전 세션 복원 방지)
864
+
858
865
  for (const [name, engine] of this.engines) {
859
866
  if (typeof engine.reset === 'function') {
860
867
  engine.reset();