 			width: @width + @knob.width
 			height: @height + @knob.height
 
-		if @knob.constrained
+		if @constrained
 			@knob.draggable.constraints =
 				x: 0
 				y: 0


	constructor: (options) ->
		super options

	@define "constrained", @simpleProperty("constrained", false)


class exports.SliderComponent extends Layer


	_setRadius: =>
		radius = @borderRadius
		@fill.style.borderRadius = "#{radius}px 0 0 #{radius}px"

	@define "constrained", @simpleProperty("constrained", false)

	@define "knobSize",
		get: -> @_knobSize
