editor: allow interacting with a widget without selecting it by using the middle mouse button or by holding shift+win (shift+cmd on mac).
This commit is contained in:
parent
aa2b9fea08
commit
1b10dc7ca0
4 changed files with 11 additions and 3 deletions
|
|
@ -14,7 +14,11 @@ var multiSelectKey = (navigator.platform || '').match('Mac') ? 'metaKey' : 'ctrl
|
|||
|
||||
var handleClick = function(event) {
|
||||
|
||||
if (!editor.enabled) return
|
||||
if (
|
||||
!editor.enabled ||
|
||||
event.detail.button === 1 ||
|
||||
(event.detail.metaKey && event.detail.shiftKey)
|
||||
) return
|
||||
|
||||
if (!event.detail[multiSelectKey] && event.type !== 'fast-right-click' && (
|
||||
event.target.classList.contains('no-widget-select') ||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class UiSelectArea {
|
|||
}
|
||||
|
||||
mousedown(e) {
|
||||
if (!e.shiftKey || event.altKey || event.button === 2) return
|
||||
if (!e.shiftKey || event.altKey || event.button === 2 || (event.shiftKey && event.metaKey)) return
|
||||
this.startX = this.curX = e.clientX
|
||||
this.startY = this.curY = e.clientY
|
||||
this.down = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue