tree: expand container when a new widget is created inside it
This commit is contained in:
parent
9bc8dab374
commit
f5705fe39b
3 changed files with 12 additions and 2 deletions
|
|
@ -18,6 +18,7 @@
|
|||
- tree: add icons before widget ids depending on the category
|
||||
- tree: activate tab when selecting it in the project tree
|
||||
- tree: allow dragging widgets from a container to another
|
||||
- tree: expand container when a new widget is created inside it
|
||||
- smarter shift+drag selection: allow selecting widgets in the area when the event started on the parent container
|
||||
|
||||
- remote control
|
||||
|
|
|
|||
|
|
@ -234,10 +234,11 @@ var handleClick = function(event) {
|
|||
data[0].widgets.push(newData)
|
||||
|
||||
var indexes = {addedIndexes: [data[0].widgets.length -1]}
|
||||
|
||||
updateWidget(editor.selectedWidgets[0], indexes)
|
||||
|
||||
|
||||
editor.pushHistory(indexes)
|
||||
editor.widgetTree.showWidget(editor.selectedWidgets[0].children[0])
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
|
@ -271,8 +272,10 @@ var handleClick = function(event) {
|
|||
data[0].tabs.push({})
|
||||
|
||||
var indexes = {addedIndexes: [data[0].tabs.length -1]}
|
||||
|
||||
updateWidget(editor.selectedWidgets[0], indexes)
|
||||
editor.pushHistory(indexes)
|
||||
editor.widgetTree.showWidget(editor.selectedWidgets[0].children[0])
|
||||
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -726,6 +726,8 @@ class Editor {
|
|||
|
||||
this.pushHistory(indexes)
|
||||
|
||||
this.widgetTree.showWidget(this.selectedWidgets[0].children[0])
|
||||
|
||||
}
|
||||
|
||||
pasteWidgetAsClone(x, y) {
|
||||
|
|
@ -765,8 +767,12 @@ class Editor {
|
|||
var indexes = {addedIndexes: [this.selectedWidgets[0].props.widgets.length -1]}
|
||||
|
||||
updateWidget(this.selectedWidgets[0], indexes)
|
||||
|
||||
this.pushHistory(indexes)
|
||||
|
||||
this.widgetTree.showWidget(this.selectedWidgets[0].children[0])
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue