s-yadav / angulargrid

Pinterest like responsive masonry grid system for angular
MIT License
277 stars 105 forks source link

Add Hooks (onDraw, onResize, onItemAdded, onItemRemoved) #142

Open ghost opened 6 years ago

ghost commented 6 years ago

Just a sugestion to make this more complete and usable for diferent objectives, how about adding a few hooks, available either through "data-attrs" or the controller injectable "angularGridInstance".

example usefull hooks: onLoad = first load onDraw = finished layout onResize =window resize reaction, user might want to change col number, gutters, etc onItemAdded onItemRemoved

I leave these suggestions as i had to do some works arounds with watches and timeouts in order to manipulate the plugins options and apply them between media queries and/or first load event.

Cheers.