dv336699 / ng-isotope

AngularJS directives for Isotope by Metafizzy
GNU General Public License v3.0
15 stars 17 forks source link

using angular filter:search #4

Open dishui opened 10 years ago

dishui commented 10 years ago

when using the angular js search with ng-isotope, the items does not rearrange initially, it seems stick at its original place, leaves a lot of blank spaces between tiles.

wonder if anyone has some suggestions on how to resolve it.

here is the code I added to the demo.html

Search ```
dv336699 commented 10 years ago

@dishui you might need to call reload while watching the "search".

try adding this to your element

<div isotope-reload-event="reload-my-stuff"></div>

and

$scope.$watch('search', function () {
        $timeout(function () {
            $rootScope.$broadcast('reload-my-stuff');
        }, 100);
    });