File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ class Rectangle extends Component {
109
109
strokeWidth = { 4 }
110
110
draggable = { false }
111
111
/>
112
- { focusChild . childId === childId ? (
112
+ { focusChild && focusChild . childId === childId ? (
113
113
< TransformerComponent focusComponent = { focusComponent } focusChild = { focusChild } />
114
114
) : (
115
115
< Label />
Original file line number Diff line number Diff line change @@ -279,14 +279,17 @@ console.log(`Real delete component action here : id:${componentId}`)
279
279
280
280
export const changeFocusComponent = ( state , { title } ) => {
281
281
const newFocusComp = state . components . find ( comp => comp . title === title ) ;
282
+ // set the "focus child" to the focus child of this particular component .
283
+ const newFocusChild = newFocusComp . focusChildId ;
282
284
283
285
let result = getSelectable ( newFocusComp , state . components ) ;
284
286
285
287
return {
286
288
...state ,
287
289
focusComponent : newFocusComp ,
288
290
selectableChildren : result . selectableChildren ,
289
- ancestors : result . ancestors
291
+ ancestors : result . ancestors ,
292
+ focusChild : newFocusChild ,
290
293
} ;
291
294
} ;
292
295
You can’t perform that action at this time.
0 commit comments