jpilfold / ngx-image-viewer

An image viewer component for Angular 2+
MIT License
49 stars 55 forks source link

Does not work on IE #22

Open XardasLord opened 6 years ago

XardasLord commented 6 years ago

Do you have plan to make this library compatible with IE explorer? Or do you maybe have some workaround to keep it working on IE?

I have the following error while trying to move the image preview by mouse -

TypeError: Object does not support the "setDragImage" property or method

but it is very known problem occuring on IE...

jpilfold commented 6 years ago

I tend to use Ubuntu so I wasn't aware of the issue, but this should be simple enough to fix. I'll try and get a fix pushed up this evening

XardasLord commented 6 years ago

Would be very nice if you could try to fix this issue on IE :)

I have found two articles which can fix this problem if this will help you some:

jpilfold commented 6 years ago

I may just resolve it by only calling setDragImage if it's defined, seeing as it's only used to set the ghost image. Would you be happy with that as a solution?

XardasLord commented 6 years ago

@jpilfold, sure it will be nice if this can be fixed this way. Let's try and see if it works :)

jpilfold commented 6 years ago

@XardasLord Okay, I've pushed up a fix to the master branch. Can you please try it out in IE and let me know? Once you're happy with it, I'll push it up to npm.

XardasLord commented 6 years ago

@jpilfold I've just tested and it works on IE now, which is great :) As you propably know this approach doesn't show the ghost "smooth" image now while moving the image while left mouse is clicked on it. It looks like the image is "jumping" - it doen not provide the "smooth" effect like on the other explorers - you know what I mean, don't you?

You can push this fix to the npm, because it fixes the problem on IE. But if you will have some time or the will to do it - it would be great also :)

jpilfold commented 6 years ago

Okay, I've pushed this up to npm, so it's now available. I will leave this issue open until a better solution has been reached.

If you want to submit a pull request for this for a fix, it would be greatly appreciated, otherwise I'll try and get round to it soon.

XardasLord commented 6 years ago

Great, I've updated the npm package and it works as expected for now.

If I will have time and some proposition to fix this issue I will try to submit pull request for this.