David-Desmaisons / Vue.resize

Vue directive to detect resize events with deboucing and throttling capacity.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not work on singleton tags

northamerican opened this issue · comments

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.

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.

@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