polarvo-layout 1.0.27 → 1.0.29

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.27",
3
+ "version": "1.0.29",
4
4
  "type": "module",
5
5
  "author": "unigence <unigencelab@gmail.com>",
6
6
  "repository": {
@@ -5,7 +5,10 @@
5
5
  :style="itemStyle"
6
6
  :class="{ 'z-50': item.id === activeId, 'bg-white border-2 border-blue-400': item.id === activeId }"
7
7
  @mousedown.stop="activeEditMode ? null : handleMouseDown($event, item.id)"
8
- >
8
+ >
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 ">
11
+ 가로: {{ size.w }} 세로: {{ size.h }}</div>
9
12
 
10
13
  <!-- 리사이즈 핸들 -->
11
14
  <div v-if="item.id === activeId" class="absolute inset-0 pointer-events-none">
@@ -56,8 +59,9 @@ const props = defineProps({
56
59
  sectionKey: { type: String, required: true },
57
60
  });
58
61
 
59
- const { activeId, handles } = toRefs(props.polarvo.freeDrop.state);
62
+ const { activeId, handles, activeElement } = toRefs(props.polarvo.freeDrop.state);
60
63
  const { getElementStyle, handleMouseDown, startResize, toggleLock } = props.polarvo.freeDrop;
64
+ const size = computed(() => activeElement.value ? activeElement.value.size : { w: 0, h: 0 });
61
65
 
62
66
  const activeEditMode = inject('activeEditMode');
63
67
  function toggleEditMode() {
@@ -94,7 +98,6 @@ function setRef(el) {
94
98
  </script>
95
99
 
96
100
  <style lang="scss" scoped>
97
-
98
101
  .handle {
99
102
  // 모서리
100
103
  &.nw {
@@ -166,4 +169,4 @@ function setRef(el) {
166
169
  cursor: e-resize;
167
170
  }
168
171
  }
169
- </style>
172
+ </style>
@@ -7,7 +7,7 @@
7
7
  :polarvo="props.polarvo"
8
8
  :sectionKey="props.sectionKey"
9
9
  ></FreeItem>
10
-
10
+
11
11
  <!-- 오버레이 -->
12
12
  <div v-if="activeEditMode" class="absolute inset-0 bg-black opacity-50"></div>
13
13
 
@@ -112,7 +112,6 @@ onUnmounted(() => {
112
112
  </script>
113
113
 
114
114
  <style lang="scss" scoped>
115
-
116
115
  .guide {
117
116
  &.vertical {
118
117
  top: 0;