 
     return @
 
-  resize: (width, height, mode) ->
+  adjustLayout: (width, height, style) ->
     if @parentNode?
-      switch mode
+      switch style
         when 'center'
           break
 

    @style[DivSugar._transformOrigin] = '0% 0%'
    @style[DivSugar._perspectiveOrigin] = '50% 50%'

    @rootNode = DivSugar.createNode 'rootNode'
    @appendChild @rootNode

    @setPerspective 1000
    @setSize 400, 300
    @setPosition 0, 0
    @setVisible true

    @_viewHeight = viewHeight
    @style.width = "#{width.toFixed(DivSugar.NUM_OF_DIGITS)}px"
    @style.height = "#{height.toFixed(DivSugar.NUM_OF_DIGITS)}px"
    @_rootNode.setTransform(DivSugar.Matrix.UNIT).scale(width / viewWidth, height / viewHeight, 1)
    @setViewAngle @_viewAngle
    return @

  getPositionX: -> @_positionX
