From 285a1088f79504ed6f1a2b565950804dd39e0e80 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 20 Feb 2020 16:16:45 +0100 Subject: [PATCH] bug fixed --- Canvas.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Canvas.js b/Canvas.js index 50e4a896e..18fe9869e 100644 --- a/Canvas.js +++ b/Canvas.js @@ -922,10 +922,12 @@ function newCanvas () { function checkDrag (event) { try { if (containerDragStarted === true || floatingObjectDragStarted === true || viewPortBeingDragged === true) { - thisObject.mouse.event = event - thisObject.mouse.position.x = event.pageX - thisObject.mouse.position.y = event.pageY - CURRENT_TOP_MARGIN - thisObject.mouse.action = 'dragging' + if (event !== undefined) { + thisObject.mouse.event = event + thisObject.mouse.position.x = event.pageX + thisObject.mouse.position.y = event.pageY - CURRENT_TOP_MARGIN + thisObject.mouse.action = 'dragging' + } browserCanvas.style.cursor = 'grabbing' thisObject.eventHandler.raiseEvent('Dragging', undefined)