About X and Y naming in easyzoom.js
Closed this issue · 1 comments
mythnc commented
First, thanks for open source your source code, and I learn a lot from it.
I have a small question about the naming relativePositionX
and relativePositionY
in
https://github.com/i-like-robots/EasyZoom/blob/master/src/easyzoom.js#L247
Is there any reason to treat Y as X and X as Y...?
I just kind of confused. Thanks.
i-like-robots commented
It's a mistake, also the moveX
and moveY
variables below seem to be the wrong way round too 🤦
When I inititally wrote the component I used very short variable names which I had to expand a few years ago in order to fix a bug (44acacc#diff-d22e25e9aee22ceaa10af787bd6c347a) - during this process I must have gotten mixed up.