 		# Calculates the size of the content. By default this returns the total
 		# size of all the content layers based on width and height. You can override
 		# this for example to take scaling into account.
-		frame = @content.contentFrame()
-		frame.width = @width if frame.width < @width
-		frame.height = @height if frame.height < @height
-		return frame
+
+		contentFrame = @content.contentFrame()
+		return size = 
+			width:  Math.max(@width, contentFrame.width)
+			height: Math.max(@height, contentFrame.height)
+
 
 	setContentLayer: (layer) ->
 

		@_content.superLayer = @
		@_content.name = "ScrollContent"
		@_content.clip = false
		@_content.backgroundColor = null
		@_content.draggable.enabled = true
		@_content.draggable.momentum = true
		@_content.on("change:subLayers", @_updateContent)

		@_updateContent()
		@scrollPoint = {x:0, y:0}

		return @_content


	_updateContent: (info) =>

		# Update the constraints based on the content size and contentInset

		contentFrame = @calculateContentSize()
		contentFrame.x += @_contentInset.left
		contentFrame.y += @_contentInset.top
		@content.frame = contentFrame

		constraintsFrame = @calculateContentSize()

		options.clip ?= true
		options.name ?= "ScrollComponent"
		options.mouseWheelEnabled ?= false
		options.backgroundColor ?= null

		super options

