       parent.children.forEach traverse
 
     return parent
-    
-  chainedFadeIn: (array, duration) ->
-    reduction = (promise, curr, index, array) =>
-      promise.then =>
-        curr._text_object._all_here = true
-        par = curr._text_object.parent
-        subset = par.children.filter (d) -> d._all_here
-        obj = @getObjectFromSubset par, subset
-        # @adjustCameraWidth obj
-        @fadeToArray(1, 1000) curr._text_object.children
-
-    promise = array.reduce reduction, Promise.resolve()
 
   # TODO: Make this much more general and add it to Main
   alignToNode: (parent) ->

      positions_array = d3.shuffle parent.children.concat parent
      parent_index = positions_array.indexOf parent
      parent_y = parent._text_object.position.y

      parent._positions_array = positions_array

      positions_array.forEach (node, index) =>

        else
          return Promise.resolve()

  chainedFadeIn: (array, duration) ->
    reduction = (promise, curr, index, array) =>
      promise.then =>
        par = curr._text_object.parent
        subset = par.children.filter (d) -> d._all_here
        obj = @getObjectFromSubset par, subset
        # @adjustCameraWidth obj
        @fadeToArray(1, 1000) curr._text_object.children
    return array.reduce reduction, Promise.resolve()

  chainedFadeInChildren: (node, next_child) ->
    pos = node._positions_array
    curr = pos.indexOf(node)
    next = pos.indexOf(next_child)
    if curr < next
      fade_array = pos.slice(curr + 1, next + 1)
    else
      fade_array = pos.slice(next, curr).reverse()
    return @chainedFadeIn fade_array, 1000

  fadeInChildWords: (node) ->
    # Fade in children, target word only
    promises = node.children.map (child) =>
      @lines_object.add child._text_object
      # Get the array of letters for the target word only
      children = @getLetterObjectsForWord child._text_object, node.word
      return @fadeToArray(1, 1000) children
    return Promise.all promises

  fadeOutOthers: (object) ->
    others = object.parent.children.filter (child) ->
      child isnt object
    promises = others.map (each) =>
      @fadeToArray(0, 1000) each.children
        .then => object.parent.remove each
    return Promise.all promises

  positionObjects: (parent) =>
    do traverse = (parent) =>
      return if ! parent.children?
