bigbite / macy.js

http://macyjs.com/
MIT License
1.28k stars 156 forks source link

useContainerForBreakpoints doesn't work #72

Open fernandodelgadomtech opened 4 years ago

fernandodelgadomtech commented 4 years ago

Hello,

in the following example, I'm setting up a div with the CSS property resize to test useContainerForBreakpoints and macy.js is not reacting to the breakpoints when I resize it.

The window one works just fine.

https://js-roryda.stackblitz.io/ Example only https://stackblitz.com/edit/js-roryda Code

ihewro commented 4 years ago

use the lastest version may solve this problem I have met this problem because I use the http://macyjs.com/assets/js/macy.min.js which verson is 2.0.0 while lastest version is 2.5.1

jrmd commented 3 years ago

@fernandodelgadomtech The example you have allows you to resize the container without resizing the document. We dont listen on containers resize. So add an event listener on the containers resize event that calls macy_instance.recalculate(true, true);