From a0f9051aa7c5c9f1f048ed1129816614962fc158 Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Fri, 6 Dec 2019 15:53:07 +0100 Subject: [PATCH] Fix event paper --- src/lib/editor/editor.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/editor/editor.component.ts b/src/lib/editor/editor.component.ts index c268f28..dafd31b 100644 --- a/src/lib/editor/editor.component.ts +++ b/src/lib/editor/editor.component.ts @@ -1175,14 +1175,14 @@ export class EditorComponent implements OnInit, OnDestroy { initPaperListeners() { // https://stackoverflow.com/questions/20463533/how-to-add-an-onclick-event-to-a-joint-js-element - this.paper.on('cell:pointerclick', (cellView: dia.CellView) => { + this.paper.on('cell:pointerup', (cellView: dia.CellView) => { if (!this.readOnlyCanvas) { this.selection = cellView; } } ); - this.paper.on('blank:pointerclick', () => { + this.paper.on('blank:pointerdown', () => { this.selection = undefined; });