File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,18 @@ export default {
6666 this .activeComponentData .y = y
6767 this .activeComponentData .w = width
6868 this .activeComponentData .h = height
69+
70+ this .componentMap [this .activeComponent ].x = x
71+ this .componentMap [this .activeComponent ].y = y
72+ this .componentMap [this .activeComponent ].w = width
73+ this .componentMap [this .activeComponent ].h = height
6974 },
7075 onDrag : function (x , y ) {
7176 this .activeComponentData .x = x
7277 this .activeComponentData .y = y
78+
79+ this .componentMap [this .activeComponent ].x = x
80+ this .componentMap [this .activeComponent ].y = y
7381 },
7482 onActivated (componentData ) {
7583 this .setActiveComponent (componentData .componentName )
Original file line number Diff line number Diff line change @@ -6,10 +6,13 @@ const actions = {
66 const { componentName } = payload
77 if ( ! state . componentMap [ componentName ] ) {
88 commit ( types . ADD_COMPONENT_TO_COMPONENT_MAP , payload )
9- commit (
10- types . ADD_COMPONENT_TO_ACTIVE_ROUTE_CHILDREN ,
11- payload . componentName
12- )
9+ if ( ! state . parentSelected ) {
10+ commit (
11+ types . ADD_COMPONENT_TO_ACTIVE_ROUTE_CHILDREN ,
12+ payload . componentName
13+ )
14+ }
15+
1316 commit ( types . ADD_COMPONENT_TO_ACTIVE_ROUTE_IN_ROUTE_MAP , payload )
1417
1518 let component = state . componentNameInputValue
You can’t perform that action at this time.
0 commit comments