_integrateBrickViews () {
    // gather brick views in order
    let brickViews = this.getModel().getBricks().map(brick => brick.getView())

    this.getElement()
    let $content = this._$content

    // detach each brick subview element without breaking it
    // (emptying parent via innerHTML does not work in IE11)
    brickViews.forEach(brickView => {
      let $element = brickView.getElement()
      $element.parentNode && $element.parentNode.removeChild($element)
    })

    // empty content element
    $content.innerHTML = ''

    // add each brick and pipe parts
    brickViews.forEach((brickView, index) => {
      $content.appendChild(this._createPipePart(index))
      $content.appendChild(this._createBrickPart(brickView))
    })

    // add end part
    $content.appendChild(this._createPipePart(brickViews.length))

    return this
  }
/**
   * Integrates brick view elements inside pipe structure.
   * @return {PipeView} Fluent interface
   */
Integrates brick view elements inside pipe structure.
@return {PipeView} Fluent interface
Integrates brick view elements inside pipe structure . @return { PipeView } Fluent interface
_integrateBrickViews () {
    let brickViews = this.getModel().getBricks().map(brick => brick.getView())
    this.getElement()
    let $content = this._$content
    brickViews.forEach(brickView => {
      let $element = brickView.getElement()
      $element.parentNode && $element.parentNode.removeChild($element)
    })
    $content.innerHTML = ''
    brickViews.forEach((brickView, index) => {
      $content.appendChild(this._createPipePart(index))
      $content.appendChild(this._createBrickPart(brickView))
    })
    $content.appendChild(this._createPipePart(brickViews.length))
    return this
  }
_integrateBrickViews ( ) { let brickViews = this . getModel ( ) . getBricks ( ) . map ( brick => brick . getView ( ) ) this . getElement ( ) let $content = this . _$content brickViews . forEach ( brickView => { let $element = brickView . getElement ( ) $element . parentNode && $element . parentNode . removeChild ( $element ) } ) $content . innerHTML = '' brickViews . forEach ( ( brickView , index ) => { $content . appendChild ( this . _createPipePart ( index ) ) $content . appendChild ( this . _createBrickPart ( brickView ) ) } ) $content . appendChild ( this . _createPipePart ( brickViews . length ) ) return this }
Integrates brick view elements inside pipe structure.
Integrates brick view elements inside pipe structure .
// gather brick views in order // detach each brick subview element without breaking it // (emptying parent via innerHTML does not work in IE11) // empty content element // add each brick and pipe parts // add end part