From 5ce828e100ca1f658bc5bbc67b26777da7df0a48 Mon Sep 17 00:00:00 2001 From: Scott Munday Date: Wed, 16 Dec 2015 14:46:44 -0500 Subject: [PATCH] You can drag and zoom out of the thresholds because of the way they didn't pass along the threshold information. --- snap.svg.zpd.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/snap.svg.zpd.js b/snap.svg.zpd.js index 1113f24..e937003 100644 --- a/snap.svg.zpd.js +++ b/snap.svg.zpd.js @@ -356,7 +356,7 @@ // Pan mode var p = _getEventPoint(event, zpdElement.data.svg).matrixTransform(zpdElement.data.stateTf); - _setCTM(g, zpdElement.data.stateTf.inverse().translate(p.x - zpdElement.data.stateOrigin.x, p.y - zpdElement.data.stateOrigin.y)); + _setCTM(g, zpdElement.data.stateTf.inverse().translate(p.x - zpdElement.data.stateOrigin.x, p.y - zpdElement.data.stateOrigin.y), zpdElement.options.zoomThreshold); } else if (zpdElement.data.state == 'drag' && zpdElement.options.drag) { @@ -367,7 +367,8 @@ zpdElement.data.root.createSVGMatrix() .translate(dragPoint.x - zpdElement.data.stateOrigin.x, dragPoint.y - zpdElement.data.stateOrigin.y) .multiply(g.getCTM().inverse()) - .multiply(zpdElement.data.stateTarget.getCTM())); + .multiply(zpdElement.data.stateTarget.getCTM()), + zpdElement.options.zoomThreshold); zpdElement.data.stateOrigin = dragPoint; }