s/Rivets.View/Rivets.Binding.
Showing
1 changed file
with
5 additions
and
5 deletions
... | @@ -158,7 +158,7 @@ class Rivets.Binding | ... | @@ -158,7 +158,7 @@ class Rivets.Binding |
158 | # Rivets.ComponentBinding | 158 | # Rivets.ComponentBinding |
159 | # ----------------------- | 159 | # ----------------------- |
160 | 160 | ||
161 | # A component view encapsulated in a binding within it's parent view. | 161 | # A component view encapsulated as a binding within it's parent view. |
162 | class Rivets.ComponentBinding extends Rivets.Binding | 162 | class Rivets.ComponentBinding extends Rivets.Binding |
163 | # Initializes a component binding for the specified view. The raw component | 163 | # Initializes a component binding for the specified view. The raw component |
164 | # element is passed in along with the component type. Attributes and scope | 164 | # element is passed in along with the component type. Attributes and scope |
... | @@ -174,7 +174,7 @@ class Rivets.ComponentBinding extends Rivets.Binding | ... | @@ -174,7 +174,7 @@ class Rivets.ComponentBinding extends Rivets.Binding |
174 | else | 174 | else |
175 | @inflections[attribute.name] = attribute.value | 175 | @inflections[attribute.name] = attribute.value |
176 | 176 | ||
177 | # Intercepts `Rivets.View::sync` since component bindings are not bound to a | 177 | # Intercepts `Rivets.Binding::sync` since component bindings are not bound to a |
178 | # particular model to update it's value. | 178 | # particular model to update it's value. |
179 | sync: -> | 179 | sync: -> |
180 | 180 | ||
... | @@ -186,12 +186,12 @@ class Rivets.ComponentBinding extends Rivets.Binding | ... | @@ -186,12 +186,12 @@ class Rivets.ComponentBinding extends Rivets.Binding |
186 | 186 | ||
187 | result | 187 | result |
188 | 188 | ||
189 | # Intercepts `Rivets.View::update` to be called on `@componentView` with a | 189 | # Intercepts `Rivets.Binding::update` to be called on `@componentView` with a |
190 | # localized map of the models. | 190 | # localized map of the models. |
191 | update: (models) => | 191 | update: (models) => |
192 | @componentView?.update @locals models | 192 | @componentView?.update @locals models |
193 | 193 | ||
194 | # Intercepts `Rivets.View::bind` to build `@componentView` with a localized | 194 | # Intercepts `Rivets.Binding::bind` to build `@componentView` with a localized |
195 | # map of models from the root view. Bind `@componentView` on subsequent calls. | 195 | # map of models from the root view. Bind `@componentView` on subsequent calls. |
196 | bind: => | 196 | bind: => |
197 | if @componentView? | 197 | if @componentView? |
... | @@ -201,7 +201,7 @@ class Rivets.ComponentBinding extends Rivets.Binding | ... | @@ -201,7 +201,7 @@ class Rivets.ComponentBinding extends Rivets.Binding |
201 | (@componentView = new Rivets.View(el, @locals(), @view.options)).bind() | 201 | (@componentView = new Rivets.View(el, @locals(), @view.options)).bind() |
202 | @el.parentNode.replaceChild el, @el | 202 | @el.parentNode.replaceChild el, @el |
203 | 203 | ||
204 | # Intercept `Rivets.View::unbind` to be called on `@componentView`. | 204 | # Intercept `Rivets.Binding::unbind` to be called on `@componentView`. |
205 | unbind: => | 205 | unbind: => |
206 | @componentView?.unbind() | 206 | @componentView?.unbind() |
207 | 207 | ... | ... |
-
Please register or sign in to post a comment