Skip to content

Commit

Permalink
Use bounding-client-rect of wrapper in moveable
Browse files Browse the repository at this point in the history
Fixes issues while zooming in
  • Loading branch information
simonwep committed Feb 4, 2020
1 parent 5e6a524 commit 10fdf27
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/pickr.es5.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pickr.es5.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pickr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pickr.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/js/libs/moveable.js
Expand Up @@ -101,8 +101,8 @@ export default function Moveable(opt) {
}

that.cache = {x: x / b.width, y: y / b.height};
const cx = clamp(x / wrapper.offsetWidth);
const cy = clamp(y / wrapper.offsetHeight);
const cx = clamp(x / b.width);
const cy = clamp(y / b.height);

switch (lock) {
case 'v':
Expand Down

0 comments on commit 10fdf27

Please sign in to comment.