-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Listening for browser resize #98
Comments
@alexlafroscia I don't see why we couldn't add it in. Since we are already triggering things when the size changes, should be able to add in some sort of option to pass a function you want to call when that happens. Just not sure what would be the most user friendly way of doing it. Did you have some ideas? @runspired what do you think of something like this? |
I definitely like the idea of using |
I've down, I'd rather an event than having you rely on binding to the props on the service. |
What events would you want to provide? Probably something like
although maybe not those names? I also thought that you could generate an even for each breakpoint, but that might be over-kill when it's easy enough to listen for the event and then check some property on the service like I suppose that maybe just doing |
This is now completed in flexi-layouts html-next/flexi-layouts#4 |
Is there a way to listen for browser resize events through Flexi? Since it's already scheduling tasks on every keyframe to check size changes, I want to avoid adding my own events. However, I couldn't find a public API for listening for this through the
device/layout
service. What I ended up doing was super-classingdevice/layout
to add an event trigger:Is there a better way to do this? Or maybe you'd consider adding a feature like this into Flexi itself?
The text was updated successfully, but these errors were encountered: