polarvo-layout 1.0.80 → 1.0.81

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.80",
3
+ "version": "1.0.81",
4
4
  "type": "module",
5
5
  "author": "unigence <unigencelab@gmail.com>",
6
6
  "repository": {
@@ -1,14 +1,17 @@
1
1
  <template>
2
- <div class="canvas-wrapper w-full h-full max-h-[765px] overflow-y-auto overflow-x-hidden">
3
- <div id="canvas-container" class="border rounded-md w-full h-full bg-white" :style="containerStyle">
4
- <BaseLayout :polarvo="polarvo" class="relative" />
5
- <div
6
- class="absolute bottom-4 left-4 right-4 bg-gray-50 flex items-center justify-center text-gray-400 rounded-lg hover:bg-gray-100 hover:text-gray-600 cursor-pointer"
7
- @click="expandContainer()"
8
- >
9
- <font-awesome-icon :icon="['fas', 'plus']" class="h-8 text-xs" />
2
+ <div class="w-full h-full flex flex-col bg-gray-50">
3
+ <div class="canvas-wrapper w-full flex-1 min-h-0 overflow-y-auto overflow-x-hidden bg-gray-50">
4
+ <div id="canvas-container" class="border rounded-md w-full bg-white" :style="containerStyle">
5
+ <BaseLayout :polarvo="polarvo" class="relative" />
10
6
  </div>
11
7
  </div>
8
+ <div
9
+ class="py-2 px-2 shrink-0 bg-white border border-gray-300 flex items-center justify-center text-gray-500 rounded-lg hover:bg-gray-100 cursor-pointer"
10
+ :style="{ width: `${displayWidth}px`, margin: '8px auto ' }"
11
+ @click="expandContainer()"
12
+ >
13
+ <font-awesome-icon :icon="['fas', 'plus']" class="h-8 text-xs" />
14
+ </div>
12
15
  </div>
13
16
  </template>
14
17
 
@@ -55,6 +58,11 @@ watch(
55
58
 
56
59
  const additionalHeight = ref(0);
57
60
  const displayHeight = computed(() => defaultHeight.value + additionalHeight.value);
61
+ const displayWidth = computed(() => {
62
+ const px = displaySize.value?.px ?? DEFAULT_DISPLAY_SIZE.px;
63
+ const percent = displaySize.value?.percent ?? DEFAULT_DISPLAY_SIZE.percent;
64
+ return px * (percent / 100);
65
+ });
58
66
 
59
67
  function expandContainer() {
60
68
  additionalHeight.value += 200;
@@ -7,7 +7,7 @@
7
7
  @mousedown.stop="activeEditMode ? null : handleMouseDown($event, item.id)"
8
8
  >
9
9
  <!-- 크기-->
10
- <div v-if="item.id === activeId" class="absolute bg-blue-400 px-2 py-1 text-sm text-white right-0 z-10">
10
+ <div v-if="item.id === activeId" class="absolute bg-blue-400 px-2 py-1 text-sm text-white right-0 z-20">
11
11
  가로: {{ Math.round(size.w) }} 세로: {{ Math.round(size.h) }}
12
12
  </div>
13
13
 
@@ -16,17 +16,17 @@
16
16
  <div
17
17
  v-for="handle in handles"
18
18
  :key="handle.name"
19
- :class="`handle absolute bg-blue-400 z-10 pointer-events-auto hover:bg-blue-700 ${handle.name}`"
19
+ :class="`handle absolute bg-blue-400 z-20 pointer-events-auto hover:bg-blue-700 ${handle.name}`"
20
20
  @mousedown="startResize($event, handle.name)"
21
21
  ></div>
22
22
  <div class="flex flex-row m-1 gap-1">
23
23
  <!-- 잠금 토글-->
24
- <div class="z-10 pointer-events-auto cursor-pointer" @click="toggleLock()">
24
+ <div class="z-20 pointer-events-auto cursor-pointer" @click="toggleLock()">
25
25
  <LockIcon v-if="item.isLocked" />
26
26
  <UnlockIcon v-else />
27
27
  </div>
28
28
  <!-- 편집 토글-->
29
- <div class="z-10 pointer-events-auto cursor-pointer">
29
+ <div class="z-20 pointer-events-auto cursor-pointer">
30
30
  <div v-if="item.type === 'inputForm'" @click="toggleEditMode">
31
31
  <div v-if="activeEditMode" class="bg-red-100 text-red-400 px-2 py-1 text-sm rounded-md hover:opacity-80 animate-pulse">
32
32
  편집모드 on
@@ -14,17 +14,17 @@
14
14
  <!-- 리사이즈 핸들 -->
15
15
  <div v-if="item.id === activeId" class="absolute inset-0 pointer-events-none">
16
16
  <div
17
- class="absolute w-2 h-2 bottom-0 right-0 bg-blue-400 z-10 pointer-events-auto cursor-se-resize"
17
+ class="absolute w-2 h-2 bottom-0 right-0 bg-blue-400 z-20 pointer-events-auto cursor-se-resize"
18
18
  @mousedown="startResize($event, item.id)"
19
19
  ></div>
20
20
  <div class="flex gap-1 m-1">
21
21
  <!-- 잠금 토글-->
22
- <div class="z-10 pointer-events-auto cursor-pointer" @click="toggleLock()">
22
+ <div class="z-20 pointer-events-auto cursor-pointer" @click="toggleLock()">
23
23
  <LockIcon v-if="item.isLocked" />
24
24
  <UnlockIcon v-else />
25
25
  </div>
26
26
  <!-- 편집 토글-->
27
- <div class="z-10 pointer-events-auto cursor-pointer">
27
+ <div class="z-20 pointer-events-auto cursor-pointer">
28
28
  <div v-if="item.type === 'inputForm'" @click="toggleEditMode">
29
29
  <div v-if="activeEditMode" class="bg-red-100 text-red-400 px-2 py-1 text-sm rounded-md hover:opacity-80 animate-pulse">
30
30
  편집모드 on