Skip to content

Mouse move only shows bottom of image on zoom when scrolling #1

Closed
@andreMariano90

Description

@andreMariano90

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);
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions