From fe1bb8442cd26b5e80b09de0eb1c4a3c68174004 Mon Sep 17 00:00:00 2001 From: Jonathan Picques Date: Mon, 16 Mar 2015 23:00:57 +0000 Subject: [PATCH] Add origin subtract for X0 and Y0 --- interact.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interact.js b/interact.js index 87daaba6b..dea54d767 100644 --- a/interact.js +++ b/interact.js @@ -3341,10 +3341,10 @@ this.clientX = client.x; this.clientY = client.y; - this.x0 = interaction.startCoords.page.x; - this.y0 = interaction.startCoords.page.y; - this.clientX0 = interaction.startCoords.client.x; - this.clientY0 = interaction.startCoords.client.y; + this.x0 = interaction.startCoords.page.x - origin.x; + this.y0 = interaction.startCoords.page.y - origin.y; + this.clientX0 = interaction.startCoords.client.x - origin.x; + this.clientY0 = interaction.startCoords.client.y - origin.y; this.ctrlKey = event.ctrlKey; this.altKey = event.altKey; this.shiftKey = event.shiftKey;