Skip to content
Permalink
Browse files

Fixing 'copy' for ScrollComponent.

  • Loading branch information...
edwinvanrijkom committed Apr 3, 2015
1 parent 58ff015 commit bab3232340f630aa09cb595e96bde35b0fbaf7f5
Showing with 5 additions and 6 deletions.
  1. +4 −4 framer/Components/ScrollComponent.coffee
  2. +1 −2 test/tests/ScrollComponentTest.coffee
@@ -54,13 +54,13 @@ EventMappers[Events.DirectionLockDidStart] = Events.DirectionLockDidStart
class exports.ScrollComponent extends Layer

# Proxy properties directly from the draggable
@define "velocity", @proxyProperty("content.draggable.velocity")
@define "velocity", @proxyProperty "content.draggable.velocity", importable: false
@define "scrollHorizontal", @proxyProperty("content.draggable.horizontal")
@define "scrollVertical", @proxyProperty("content.draggable.vertical")
@define "speedX", @proxyProperty("content.draggable.speedX")
@define "speedY", @proxyProperty("content.draggable.speedY")
@define "isDragging", @proxyProperty("content.draggable.isDragging")
@define "isMoving", @proxyProperty("content.draggable.isMoving")
@define "isDragging", @proxyProperty "content.draggable.isDragging", importable: false
@define "isMoving", @proxyProperty "content.draggable.isMoving", importable: false
@define "propagateEvents", @proxyProperty("content.draggable.propagateEvents")
@define "directionLock", @proxyProperty("content.draggable.directionLock")
@define "directionLockThreshold", @proxyProperty("content.draggable.directionLockThreshold")
@@ -73,7 +73,7 @@ class exports.ScrollComponent extends Layer
@define "mouseWheelSpeedMultiplier", @simpleProperty("mouseWheelSpeedMultiplier", 1)

constructor: (options={}) ->

# options.backgroundColor ?= null
options.clip ?= true
options.name ?= @constructor.name
@@ -7,8 +7,7 @@ describe "ScrollComponent", ->
instance = new ScrollComponent (scrollHorizontal: false)
instance.scrollHorizontal.should.be.false

# Currently fails:
it.skip "should keep scrollHorizontal value on copy", ->
it "should keep scrollHorizontal value on copy", ->

instance = new ScrollComponent (scrollHorizontal: false)
instance.scrollHorizontal.should.be.false

0 comments on commit bab3232

Please sign in to comment.
You can’t perform that action at this time.