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 {
66
66
this .activeComponentData .y = y
67
67
this .activeComponentData .w = width
68
68
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
69
74
},
70
75
onDrag : function (x , y ) {
71
76
this .activeComponentData .x = x
72
77
this .activeComponentData .y = y
78
+
79
+ this .componentMap [this .activeComponent ].x = x
80
+ this .componentMap [this .activeComponent ].y = y
73
81
},
74
82
onActivated (componentData ) {
75
83
this .setActiveComponent (componentData .componentName )
Original file line number Diff line number Diff line change @@ -6,10 +6,13 @@ const actions = {
6
6
const { componentName } = payload
7
7
if ( ! state . componentMap [ componentName ] ) {
8
8
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
+
13
16
commit ( types . ADD_COMPONENT_TO_ACTIVE_ROUTE_IN_ROUTE_MAP , payload )
14
17
15
18
let component = state . componentNameInputValue
You can’t perform that action at this time.
0 commit comments