Skip to content

Commit

Permalink
Fixing 'copy' for ScrollComponent.
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinvanrijkom committed Apr 3, 2015
1 parent 58ff015 commit bab3232
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions framer/Components/ScrollComponent.coffee
Expand Up @@ -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")
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions test/tests/ScrollComponentTest.coffee
Expand Up @@ -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
Expand Down

0 comments on commit bab3232

Please sign in to comment.