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
cebdbf06
authored
2012-08-31 23:55:09 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'formatters-with-function-bindings'
2 parents
2be61616
052cc70c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
src/rivets.coffee
src/rivets.coffee
View file @
cebdbf0
...
...
@@ -43,7 +43,10 @@ class Rivets.Binding
# Sets the value for the binding. This Basically just runs the binding routine
# with the suplied value formatted.
set
:
(
value
)
=>
value
=
@
formattedValue
value
value
=
if
value
instanceof
Function
and
@
options
.
special
isnt
"event"
@
formattedValue
value
.
call
@
model
else
@
formattedValue
value
if
@
options
.
special
is
"event"
@
routine
@
el
,
value
,
@
currentListener
...
...
@@ -51,7 +54,6 @@ class Rivets.Binding
else
if
@
options
.
special
is
"iteration"
@
routine
@
el
,
value
,
@
else
value
=
value
.
call
(
@
model
)
if
value
instanceof
Function
@
routine
@
el
,
value
# Subscribes to the model for changes at the specified keypath. Bi-directional
...
...
Please
register
or
sign in
to post a comment