mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-09 18:02:50 +01:00
clickaway for pick list dialog
This commit is contained in:
parent
c941e07a23
commit
c46b6a9104
1 changed files with 6 additions and 0 deletions
|
|
@ -142,6 +142,11 @@ export function activate(context) {
|
|||
handleSolidPick(e);
|
||||
}
|
||||
|
||||
function clickaway() {
|
||||
PickListDialogRequest$.next(null);
|
||||
domElement.removeEventListener('click', clickaway, false);
|
||||
}
|
||||
|
||||
function setPickHandler(handler) {
|
||||
pickHandler = handler || defaultHandler;
|
||||
services.marker.clear();
|
||||
|
|
@ -168,6 +173,7 @@ export function activate(context) {
|
|||
token: Date.now(),
|
||||
capture: Array.from(capture)
|
||||
});
|
||||
setTimeout(() => domElement.addEventListener('click', clickaway, false), 100);
|
||||
return;
|
||||
}
|
||||
traversePickResults(event, pickResults, ALL_EXCLUDING_SOLID_KINDS, pickHandler);
|
||||
|
|
|
|||
Loading…
Reference in a new issue