Hide the initial element (reference + marker) in the iteration binding.
Showing
1 changed file
with
3 additions
and
0 deletions
... | @@ -192,6 +192,8 @@ eventBinding = (event) -> (el, bind, unbind) -> | ... | @@ -192,6 +192,8 @@ eventBinding = (event) -> (el, bind, unbind) -> |
192 | 192 | ||
193 | # Returns an iteration binding routine for the specified collection. | 193 | # Returns an iteration binding routine for the specified collection. |
194 | iterationBinding = (name) -> (el, collection, binding) -> | 194 | iterationBinding = (name) -> (el, collection, binding) -> |
195 | Rivets.routines.hide el, true | ||
196 | |||
195 | for iteration in binding.iterated | 197 | for iteration in binding.iterated |
196 | iteration.view.unbind() | 198 | iteration.view.unbind() |
197 | iteration.el.parentNode.removeChild iteration.el | 199 | iteration.el.parentNode.removeChild iteration.el |
... | @@ -203,6 +205,7 @@ iterationBinding = (name) -> (el, collection, binding) -> | ... | @@ -203,6 +205,7 @@ iterationBinding = (name) -> (el, collection, binding) -> |
203 | data[name] = item | 205 | data[name] = item |
204 | 206 | ||
205 | itemEl = el.cloneNode true | 207 | itemEl = el.cloneNode true |
208 | Rivets.routines.show itemEl, true | ||
206 | el.parentNode.insertBefore itemEl, el | 209 | el.parentNode.insertBefore itemEl, el |
207 | 210 | ||
208 | binding.iterated.push | 211 | binding.iterated.push | ... | ... |
-
Please register or sign in to post a comment