consistent Alt-key behavior
This commit is contained in:
@@ -488,12 +488,16 @@ export class CmapInteractionController {
|
||||
if (!target) {
|
||||
this.editor.ensureCanvasExtent(point.x, point.y);
|
||||
const parentSubmap = this.editor.submapAtPoint(point);
|
||||
const direct = event.altKey || upEvent.altKey;
|
||||
debug("relation dropped on empty canvas", {
|
||||
sourceId: source.id,
|
||||
point,
|
||||
parentSubmapId: parentSubmap ? parentSubmap.id : null
|
||||
parentSubmapId: parentSubmap ? parentSubmap.id : null,
|
||||
direct
|
||||
});
|
||||
if (this.editor.onCreateConnectedItem) this.editor.onCreateConnectedItem({ source, point, parentSubmap });
|
||||
if (this.editor.onCreateConnectedItem) {
|
||||
this.editor.onCreateConnectedItem({ source, point, parentSubmap, direct });
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (target === source) return;
|
||||
|
||||
Reference in New Issue
Block a user