File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
Package . describe ( {
2
2
name : 'smeevil:reactive-block-grid' ,
3
3
summary : 'Given a cursor and a template this will create a reactive responsive block grid based on isotope' ,
4
- version : '1.0.2 ' ,
4
+ version : '1.0.3 ' ,
5
5
git : 'https://github.com/smeevil/responsive-block-grid.git'
6
6
} ) ;
7
7
Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ Template.reactiveBlockGrid.helpers
26
26
cssClasses : ->
27
27
@cssClass
28
28
29
+ Template .reactiveBlockGrid .destroyed = ()->
30
+ if @queryHandle
31
+ @queryHandle .stop ()
32
+ @queryHandle = null
33
+
29
34
Template .reactiveBlockGrid .rendered = ()->
30
35
options = {
31
36
itemSelector : ' li'
@@ -59,7 +64,7 @@ Template.reactiveBlockGrid.rendered = ()->
59
64
60
65
if @data .cursor .limit ? || @data .cursor .skip ?
61
66
62
- @data .cursor .observeChanges
67
+ @queryHandle = @ data .cursor .observeChanges
63
68
addedBefore : -> null
64
69
movedBefore : -> null
65
70
@@ -69,7 +74,7 @@ Template.reactiveBlockGrid.rendered = ()->
69
74
$el .isotope (' remove' , item).isotope (' layout' )
70
75
71
76
else
72
- @data .cursor .observe
77
+ @queryHandle = @ data .cursor .observe
73
78
removed : (doc ) ->
74
79
selector = " [data-reactive-block-grid-item-id=#{ doc ._id } ]"
75
80
item = $el .find (selector)
You can’t perform that action at this time.
0 commit comments