brtnshrdr / angular2-image-zoom

An Angular2 Image Zoom Directive
MIT License
22 stars 15 forks source link

img.x replacement #7

Closed VolkerBb closed 7 years ago

VolkerBb commented 7 years ago

I noticed a problem on Firefox with the placement of the zoom window (windowPosition 12). I found out that the problem occurred because img.x on Firefox delivers different values than on Safari or Chrome. The usage of .getBoundingClientRect().left can be used on all 3 browsers with equal values. I changed img.y to .getBoundingClientRect().top for consistency.