David-Desmaisons / Vue.resize

Vue directive to detect resize events with deboucing and throttling capacity.
MIT License
327 stars 36 forks source link

Does not work on singleton tags #9

Closed northamerican closed 5 years ago

northamerican commented 5 years ago

The directive fails with <img> elements and other singletons. The v-resize callback is not triggered. Probably because the resize-sensor is placed inside the target element and singletons cannot have elements inside them.

northamerican commented 5 years ago

Additionally, if support for img tags were implemented, it would be neat if it also took into account the internal size of an image with object-fit: cover set.

David-Desmaisons commented 5 years ago

@northamerican It is inherent to the way resize-sensor works as you pointed it out. So this will be a permante restriction this direcyive does not apply in such cases