GithubHelp home page GithubHelp logo

Comments (6)

mater1996 avatar mater1996 commented on June 15, 2024

是修改了哪里的背景图? 可以给个repo复现一下吗?https://codesandbox.io/

from vue-photo-zoom-pro.

koukouzaki avatar koukouzaki commented on June 15, 2024

因为我这边还需要zoomIn,zoomOut的功能,所以会放大缩小那张原图,一旦放大缩小后,用放大镜就会有定位偏移不准的问题,不知道怎样可以触发一下刷新,让放大镜重新获取最新的原图。

from vue-photo-zoom-pro.

mater1996 avatar mater1996 commented on June 15, 2024

目前是手动调用组件的reset方法来重新计算边界信息, 看起来你是直接修改了img的大小,但是移动事件是绑定到父层的,父元素的大小是不会根据内部transform的改变而改变的

from vue-photo-zoom-pro.

koukouzaki avatar koukouzaki commented on June 15, 2024

所以不知道怎么处理才能正常。貌似得去改动组件源码的内容了

from vue-photo-zoom-pro.

mater1996 avatar mater1996 commented on June 15, 2024

辛苦发一个复现repo吧

from vue-photo-zoom-pro.

mater1996 avatar mater1996 commented on June 15, 2024

原因是因为设置放大器的位置以及获取的宽度被scale放大了, 所以位置被css 重新 * 2 导致中心点偏移错误
不建议使用scale对该组件进行放大,因为内部使用了absolute进行偏移,会导致放大器以及mask的位置被css放大

from vue-photo-zoom-pro.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.