tree: blink selection when hitting "t" too
This commit is contained in:
parent
c3f466d652
commit
c89252f4cc
3 changed files with 15 additions and 7 deletions
|
|
@ -85,13 +85,7 @@ var handleClick = function(event) {
|
|||
label: icon('project-diagram') + ' ' + locales('editor_show_in_tree'),
|
||||
action: ()=>{
|
||||
editor.widgetTree.showWidget(editor.selectedWidgets[0])
|
||||
DOM.each(editor.widgetTree.list, '.editing', (el)=>{
|
||||
el.classList.add('editor-blink')
|
||||
el.scrollIntoView({block: 'center'})
|
||||
setTimeout(()=>{
|
||||
el.classList.remove('editor-blink')
|
||||
}, 800)
|
||||
})
|
||||
editor.widgetTree.blinkSelected()
|
||||
},
|
||||
shortcut: 't'
|
||||
})
|
||||
|
|
|
|||
|
|
@ -438,6 +438,8 @@ class Editor {
|
|||
case 't':
|
||||
if (!this.selectedWidgets.length) return
|
||||
this.widgetTree.showWidget(editor.selectedWidgets[0])
|
||||
this.widgetTree.blinkSelected()
|
||||
|
||||
break
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -223,6 +223,18 @@ class UiTree extends UiWidget {
|
|||
|
||||
}
|
||||
|
||||
blinkSelected() {
|
||||
|
||||
DOM.each(this.list, '.editing', (el)=>{
|
||||
el.classList.add('editor-blink')
|
||||
el.scrollIntoView({block: 'center'})
|
||||
setTimeout(()=>{
|
||||
el.classList.remove('editor-blink')
|
||||
}, 800)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
select() {
|
||||
|
||||
// hint selection in folded containers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue