Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
rivets
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a91cc229
authored
2012-08-08 20:21:31 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Hide the initial element (reference + marker) in the iteration binding.
1 parent
29a09067
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
src/rivets.coffee
src/rivets.coffee
View file @
a91cc22
...
...
@@ -192,6 +192,8 @@ eventBinding = (event) -> (el, bind, unbind) ->
# Returns an iteration binding routine for the specified collection.
iterationBinding
=
(
name
)
->
(
el
,
collection
,
binding
)
->
Rivets
.
routines
.
hide
el
,
true
for
iteration
in
binding
.
iterated
iteration
.
view
.
unbind
()
iteration
.
el
.
parentNode
.
removeChild
iteration
.
el
...
...
@@ -203,6 +205,7 @@ iterationBinding = (name) -> (el, collection, binding) ->
data
[
name
]
=
item
itemEl
=
el
.
cloneNode
true
Rivets
.
routines
.
show
itemEl
,
true
el
.
parentNode
.
insertBefore
itemEl
,
el
binding
.
iterated
.
push
...
...
Please
register
or
sign in
to post a comment