-
Notifications
You must be signed in to change notification settings - Fork 275
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
faGridLayout doesn't $observe its attributes #132
Comments
I was able to achieve the responsive layout I wanted by modifying each surface, but would really appreciate the convenience and fluidity available in fa-grid-view or fa-flexible-view. If I have time I may submit a pull request with this added functionality. |
Hey @steveblue — thank you for mentioning this. I went ahead and threw in $watch support for fa-grid-layout's fa-options in 445707f so it should be dynamically+automatically updated now. |
I believe more needs to be done for the GridLayout to update on an event. The only way I could get the GridLayout to update with Vanilla Famo.us was to set the return of each surface render to Null, empty the array of surfaces enclosed in the GridLayout, and then repopulate them. This seems taxing however it was actually performant on my end. I think this may be the only way to reLayout the Grid. Perhaps I'm missing something about famous-angular, is there a method I need to use to resequence the surfaces in a GridLayout?
|
GridLayout's That's what gets called in 445707f to update dimensions when fa-options changes. This simple example works for me: https:/thomasstreet/famous-angular-examples/commit/33b495fe64dd04330dba7c1effdacbcd565dfb74 Two issues you could be running into are: 1. you'll need to pull down famous-angular#master instead of 0.0.17, and 2. you will need to call a manual $scope.$apply() if you update the options outside of Angular's digest cycle (e.g. if you use vanilla Famo.us event listeners like in the linked example.) |
Thanks Zack for the pointers, got it to work on my end. |
I'm running into an issue when I'd like to change gridLayout properties per responsive state in our web app. Basically, when I call these two functions, the properties mapped to the fa-modifier will change on an event (probably because the attributes of that directive are using the
$observe
method.) Can you please add this functionality to gridLayout so that when it's attributes are changed it forces the grid to relayout?And my source:
The text was updated successfully, but these errors were encountered: