1313 @deactivated =" onDeactivated(componentData)"
1414 @dragging =" onDrag"
1515 @resizing =" onResize"
16- @dblclick.native =" onDoubleClick(componentData)"
1716 >
1817 <h3 >{{ componentData.componentName }}</h3 >
1918 </VueDraggableResizable >
2221<script >
2322import { mapState , mapActions } from ' vuex'
2423import VueDraggableResizable from ' vue-draggable-resizable'
24+ import ' vue-draggable-resizable/dist/VueDraggableResizable.css'
2525
2626export default {
2727 name: ' ComponentDisplay' ,
@@ -58,7 +58,7 @@ export default {
5858 }
5959 },
6060 methods: {
61- ... mapActions ([' setActiveComponent' , ' updateOpenModal ' ]),
61+ ... mapActions ([' setActiveComponent' ]),
6262 onResize : function (x , y , width , height ) {
6363 this .activeComponentData .x = x
6464 this .activeComponentData .y = y
@@ -75,11 +75,12 @@ export default {
7575 },
7676 onDeactivated () {
7777 this .activeComponentData .isActive = false
78- },
79- onDoubleClick (compData ) {
80- this .setActiveComponent (compData .componentName )
81- this .activeComponentData .isActive = true
8278 }
79+ // @dblclick.native="onDoubleClick(componentData)"
80+ // onDoubleClick (compData) {
81+ // this.setActiveComponent(compData.componentName)
82+ // this.activeComponentData.isActive = true
83+ // }
8384 }
8485}
8586 </script >
@@ -88,13 +89,86 @@ export default {
8889.component-display {
8990 border : 2px dotted rgb (14 , 14 , 14 );
9091 background-color : rgba (242 , 234 , 228 , 0.61 );
91- height : 70vh ;
92- width : 70vw ;
92+ height : 500px ;
93+ width : 500px ;
94+ /* height: 70vh; */
95+ /* width: 70vw; */
9396 position : relative ;
9497}
9598
9699.component-box {
97100 color : white ;
98101 border : 1px solid salmon ;
99102}
103+ .my-handle-class {
104+ position : absolute ;
105+ background-color : pink ;
106+ border : 1px solid black ;
107+ border-radius : 50% ;
108+ height : 14px ;
109+ width : 14px ;
110+ -webkit-transition : all 300ms linear ;
111+ -ms-transition : all 300ms linear ;
112+ transition : all 300ms linear ;
113+ }
114+
115+ .my-handle-class-tl {
116+ top : -14px ;
117+ left : -14px ;
118+ cursor : nw-resize ;
119+ }
120+
121+ .my-handle-class-tm {
122+ top : -14px ;
123+ left : 50% ;
124+ margin-left : -7px ;
125+ cursor : n-resize ;
126+ }
127+
128+ .my-handle-class-tr {
129+ top : -14px ;
130+ right : -14px ;
131+ cursor : ne-resize ;
132+ }
133+
134+ .my-handle-class-ml {
135+ top : 50% ;
136+ margin-top : -7px ;
137+ left : -14px ;
138+ cursor : w-resize ;
139+ }
140+
141+ .my-handle-class-mr {
142+ top : 50% ;
143+ margin-top : -7px ;
144+ right : -14px ;
145+ cursor : e-resize ;
146+ }
147+
148+ .my-handle-class-bl {
149+ bottom : -14px ;
150+ left : -14px ;
151+ cursor : sw-resize ;
152+ }
153+
154+ .my-handle-class-bm {
155+ bottom : -14px ;
156+ left : 50% ;
157+ margin-left : -7px ;
158+ cursor : s-resize ;
159+ }
160+
161+ .my-handle-class-br {
162+ bottom : -14px ;
163+ right : -14px ;
164+ cursor : se-resize ;
165+ }
166+
167+ .my-handle-class-tl :hover ,
168+ .my-handle-class-tr :hover ,
169+ .my-handle-class-bl :hover ,
170+ .my-handle-class-br :hover {
171+ background-color : red ;
172+ transform : scale (1.4 );
173+ }
100174 </style >
0 commit comments