Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zoompic插件中通过对图片双击或双指放大,在控制台报错 #437

Open
harmsworth opened this issue May 18, 2018 · 0 comments

Comments

@harmsworth
Copy link

iSlider.plugin.zoompic.js?9af6:285 Uncaught TypeError: Cannot read property 'pageX' of undefined
at handleDoubleTap (iSlider.plugin.zoompic.js?9af6:285)
at iSlider.endHandler (iSlider.plugin.zoompic.js?9af6:314)
at iSliderPrototype.handleEvent (iSlider.js?c3de:1183)

这一段代码
/**
* Double tao handle
* @param {object} evt
*/
function handleDoubleTap(evt) {
var zoomFactor = zoomFactor || 2;
var node = zoomNode;
var pos = getPosition(node);
currentScale = currentScale == 1 ? zoomFactor : 1;
node.style.webkitTransform = generateTranslate(0, 0, 0, currentScale);
if (currentScale != 1) node.style.webkitTransformOrigin = generateTransformOrigin(evt.touches[0].pageX - pos.left, evt.touches[0].pageY - pos.top);
}

pageX报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant