Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

A view now call new children for 'child' instead of 'view'. Makes mor…

…e sense.
  • Loading branch information...
commit 4b00db5d13b05aeb2c1fb199f7d20887b4000154 1 parent d08e192
@rasmusrn authored
Showing with 8 additions and 9 deletions.
  1. +8 −9 lib/wingman/view.coffee
View
17 lib/wingman/view.coffee
@@ -58,18 +58,17 @@ module.exports = class extends WingmanObject
className = Fleck.camelize(Fleck.underscore(name), true) + 'View'
klass = @get('childClasses')[className]
- view = new klass parent: @, app: @get('app')
- view.set options.properties if options?.properties
+ child = new klass parent: @, app: @get('app')
+ child.set options.properties if options?.properties
- @get('children').push view
- view.bind 'remove', => @get('children').remove view
+ @get('children').push child
+ child.bind 'remove', => @get('children').remove child
- view.bind 'descendantCreated', (view) => @trigger 'descendantCreated', view
- @trigger 'descendantCreated', view
+ child.bind 'descendantCreated', (child) => @trigger 'descendantCreated', child
+ @trigger 'descendantCreated', child
- view.render() if options?.render
-
- view
+ child.render() if options?.render
+ child
templateSource: ->
name = @get 'templateName'
Please sign in to comment.
Something went wrong with that request. Please try again.