Mouse move only shows bottom of image on zoom when scrolling
andreMariano90 opened this issue · 3 comments
andreMariano90 commented
To fix it you should change the
e.pageX and e.pageY of the handleMove function to e.clientX and e.clientY
ex:
handleMove: function (e) {
this.maskX = this.outXCheck(e.clientX - this.imgRect.left);
this.maskY = this.outYCheck(e.clientY - this.imgRect.top);
this.zoomLeft = this.imgRect.width + 10;
// 计算大图偏移量
this.zoomPosition.x = this.maskX * (this.zoomImgWidth / this.imgRect.width);
this.zoomPosition.y = this.maskY * (this.zoomImgHeight / this.imgRect.height);
}
haider1412 commented
where can we change this code. beacuse we cannot change it in node module. please reply
anthinkingcoder commented
To fix it you should change the
e.pageX and e.pageY of the handleMove function to e.clientX and e.clientYex:
handleMove: function (e) { this.maskX = this.outXCheck(e.clientX - this.imgRect.left); this.maskY = this.outYCheck(e.clientY - this.imgRect.top); this.zoomLeft = this.imgRect.width + 10; // 计算大图偏移量 this.zoomPosition.x = this.maskX * (this.zoomImgWidth / this.imgRect.width); this.zoomPosition.y = this.maskY * (this.zoomImgHeight / this.imgRect.height); }
thank you, i will be fix it
anthinkingcoder commented
where can we change this code. beacuse we cannot change it in node module. please reply
fork it