Tooltips
This commit is contained in:
parent
8988720c0e
commit
bcd0f1ce15
6 changed files with 123 additions and 15 deletions
|
|
@ -17,6 +17,7 @@ export class App {
|
|||
'EDITOR_NODE_SAVE',
|
||||
'MENU_ITEM_SELECTED',
|
||||
'NODE_CONNECT',
|
||||
'NODE_COPY_PATH',
|
||||
'NODE_CREATE_DIALOG',
|
||||
'NODE_DELETE',
|
||||
'NODE_EDIT_NAME',
|
||||
|
|
@ -49,6 +50,14 @@ export class App {
|
|||
selectnode.render()
|
||||
break
|
||||
|
||||
case 'NODE_COPY_PATH':
|
||||
const uri = `${location.protocol}//${location.host}/nodes/${event.detail}`
|
||||
const img = document.querySelector('#editor-node .copy-path')
|
||||
img.classList.add('highlight')
|
||||
setTimeout(()=>img.classList.remove('highlight'), 150)
|
||||
navigator.clipboard.writeText(uri)
|
||||
break
|
||||
|
||||
case 'NODE_SELECTED':
|
||||
for (const n of document.querySelectorAll('#nodes .node.selected'))
|
||||
n.classList.remove('selected')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue