Permalink
Browse files

Statisfy Atoms patronizing whitespace settings

  • Loading branch information...
Koen Bok
Koen Bok committed Feb 8, 2016
1 parent 8688f84 commit 094286c12b3e89c4c828c36f3ece9ec3dc1c4e16
Showing with 532 additions and 553 deletions.
  1. +7 −7 Makefile
  2. +1 −1 coffeelint.json
  3. +8 −8 framer/Animation.coffee
  4. +2 −2 framer/AnimationGroup.coffee
  5. +3 −3 framer/AnimationLoop.coffee
  6. +2 −2 framer/Animator.coffee
  7. +3 −3 framer/Animators/LinearAnimator.coffee
  8. +1 −1 framer/Animators/SpringDHOAnimator.coffee
  9. +3 −3 framer/Animators/SpringRK4Animator.coffee
  10. +6 −6 framer/BackgroundLayer.coffee
  11. +3 −3 framer/BaseClass.coffee
  12. +4 −4 framer/Canvas.coffee
  13. +150 −150 framer/Color.coffee
  14. +2 −5 framer/Compat.coffee
  15. +2 −2 framer/Components/DeviceComponent.coffee
  16. +7 −7 framer/Components/PageComponent.coffee
  17. +23 −23 framer/Components/ScrollComponent.coffee
  18. +2 −2 framer/Config.coffee
  19. +21 −22 framer/Context.coffee
  20. +4 −4 framer/DOMEventManager.coffee
  21. +6 −6 framer/Defaults.coffee
  22. +3 −3 framer/EventBuffer.coffee
  23. +1 −1 framer/EventEmitter.coffee
  24. +1 −1 framer/Events.coffee
  25. +6 −6 framer/Extras/MobileScrollFix.coffee
  26. +1 −1 framer/Extras/OmitNew.coffee
  27. +35 −35 framer/Extras/TouchEmulator.coffee
  28. +1 −1 framer/Framer.coffee
  29. +1 −1 framer/Gestures.coffee
  30. +6 −6 framer/Importer.coffee
  31. +1 −1 framer/Integrator.coffee
  32. +34 −34 framer/Layer.coffee
  33. +13 −13 framer/LayerAnchor.coffee
  34. +3 −3 framer/LayerPinchable.coffee
  35. +4 −4 framer/LayerStates.coffee
  36. +3 −5 framer/LayerStyle.coffee
  37. +1 −1 framer/Matrix.coffee
  38. +5 −5 framer/Print.coffee
  39. +3 −3 framer/Screen.coffee
  40. +1 −2 framer/Simulation.coffee
  41. +7 −7 framer/Simulator.coffee
  42. +2 −3 framer/Simulators/FrictionSimulator.coffee
  43. +20 −20 framer/Simulators/MomentumBounceSimulator.coffee
  44. +6 −6 framer/Simulators/SpringSimulator.coffee
  45. +1 −1 framer/Underscore.coffee
  46. +5 −5 framer/Utils.coffee
  47. +6 −6 framer/VideoLayer.coffee
  48. +4 −4 gulpfile.coffee
  49. +2 −3 readme.md
  50. +1 −1 scripts/autocomplete.blacklist.txt
  51. +1 −1 scripts/autocomplete.py
  52. +2 −2 scripts/banner.coffee
  53. +1 −1 scripts/fix-sourcemap.coffee
  54. +3 −3 scripts/site-deploy.coffee
  55. +1 −1 scripts/version.coffee
  56. +1 −2 scripts/watch.coffee
  57. +3 −4 test/tests/BaseClassTest.coffee
  58. +2 −2 test/tests/ColorTest.coffee
  59. +10 −10 test/tests/ContextTest.coffee
  60. +1 −1 test/tests/DeviceComponentTest.coffee
  61. +6 −7 test/tests/EventEmitterTest.coffee
  62. +2 −4 test/tests/ImporterTest.coffee
  63. +4 −4 test/tests/LayerAnimationTest.coffee
  64. +5 −6 test/tests/LayerEventsTest.coffee
  65. +0 −1 test/tests/LayerGesturesTest.coffee
  66. +6 −7 test/tests/LayerStatesTest.coffee
  67. +41 −45 test/tests/LayerTest.coffee
  68. +1 −1 test/tests/ScrollComponentTest.coffee
  69. +2 −2 test/tests/UtilsTest.coffee
  70. +1 −1 test/tests/VersionTest.coffee
  71. +1 −1 test/tests/VideoLayerTest.coffee
  72. +1 −1 wercker.yml
View
@@ -15,22 +15,22 @@ unbootstrap:
clean:
rm -rf build
build: bootstrap clean
build: bootstrap clean
mkdir -p build
$(gulp) build-release
debug: bootstrap clean
debug: bootstrap clean
mkdir -p build
$(gulp) build-debug
watch: bootstrap
watch: bootstrap
$(gulp) watch
dev: bootstrap
dev: bootstrap
open -a "Framer Studio Beta" "extras/DevServer.framer"
$(bin)/coffee scripts/devserver.coffee
test: bootstrap
test: bootstrap
$(gulp) test
coverage: bootstrap
@@ -77,11 +77,11 @@ deploy:
resources%optimize:
python scripts/optimize.py
resources%upload:
cd extras/resources.framerjs.com; cactus deploy
lint:
./node_modules/.bin/coffeelint -f coffeelint.json -r framer
.PHONY: all build test clean perf watch
.PHONY: all build test clean perf watch
View
@@ -39,4 +39,4 @@
"no_implicit_parens": {
"level": "ignore"
}
}
}
View
@@ -111,14 +111,14 @@ class exports.Animation extends EventEmitter
# We also need to account for derivatives from x, y
if property is "x" and (
@_stateA.hasOwnProperty("minX") or
@_stateA.hasOwnProperty("midX") or
@_stateA.hasOwnProperty("minX") or
@_stateA.hasOwnProperty("midX") or
@_stateA.hasOwnProperty("maxX"))
animation.stop()
if property is "y" and (
@_stateA.hasOwnProperty("minY") or
@_stateA.hasOwnProperty("midY") or
@_stateA.hasOwnProperty("minY") or
@_stateA.hasOwnProperty("midY") or
@_stateA.hasOwnProperty("maxY"))
animation.stop()
@@ -145,7 +145,7 @@ class exports.Animation extends EventEmitter
return true
stop: (emit=true)->
@options.layer.context.removeAnimation(@)
@emit("stop") if emit
@@ -266,16 +266,16 @@ class exports.Animation extends EventEmitter
else if _.isString(v)
if Color.isColorString(v)
animatableProperties[k] = new Color(v)
return animatableProperties
##############################################################
## EVENT HELPERS
onAnimationStart: (cb) -> @on(Events.AnimationStart, cb)
onAnimationStop: (cb) -> @on(Events.AnimationStop, cb)
onAnimationEnd: (cb) -> @on(Events.AnimationEnd, cb)
onAnimationDidStart: (cb) -> @on(Events.AnimationDidStart, cb)
onAnimationDidStop: (cb) -> @on(Events.AnimationDidStop, cb)
onAnimationDidEnd: (cb) -> @on(Events.AnimationDidEnd, cb)
onAnimationDidEnd: (cb) -> @on(Events.AnimationDidEnd, cb)
@@ -7,7 +7,7 @@ class AnimationGroup extends EventEmitter
constructor: (animations=[]) ->
@setAnimations(animations)
@_currentAnimation = null
setAnimations: (animations) ->
# Copy all animations so we can use the same one for repeat
@_animations = _.map animations, (animation) -> animation.copy()
@@ -31,4 +31,4 @@ class AnimationGroup extends EventEmitter
@_animations[0].start()
stop: ->
@_currentAnimation?.stop()
@_currentAnimation?.stop()
@@ -20,7 +20,7 @@ getTime = -> Utils.getTime() * 1000
class exports.AnimationLoop extends EventEmitter
constructor: ->
# For now we set the delta to a fixed time because using performance.now plus
# raf seems to cause weird issues.
@delta = 1/60
@@ -37,7 +37,7 @@ class exports.AnimationLoop extends EventEmitter
@maximumListeners = Infinity
start: =>
animationLoop = @
_timestamp = getTime()
@@ -64,4 +64,4 @@ class exports.AnimationLoop extends EventEmitter
window.requestAnimationFrame(tick)
, 0
tick()
tick()
View
@@ -9,7 +9,7 @@ class exports.Animator
- Takes a set of input values at setup({input values})
- Emits an output value for progress (0 -> 1) in value(progress)
"""
constructor: (options={}) ->
@setup options
@@ -22,6 +22,6 @@ class exports.Animator
finished: ->
throw Error "Not implemented"
# start: -> Framer.Loop.on("update", )
# stop: -> AnimationLoop.remove @
@@ -3,7 +3,7 @@ Utils = require "../Utils"
{Animator} = require "../Animator"
class exports.LinearAnimator extends Animator
setup: (options) ->
@options = _.defaults options,
@@ -13,7 +13,7 @@ class exports.LinearAnimator extends Animator
@_time = 0
next: (delta) ->
@_time += delta
if @finished()
@@ -22,4 +22,4 @@ class exports.LinearAnimator extends Animator
return @_time / @options.time
finished: ->
@_time >= @options.time - @options.precision
@_time >= @options.time - @options.precision
@@ -40,4 +40,4 @@ class exports.SpringDHOAnimator extends Animator
@_value
finished: =>
@_time > 0 and Math.abs(@_velocity) < @options.tolerance
@_time > 0 and Math.abs(@_velocity) < @options.tolerance
@@ -31,11 +31,11 @@ class exports.SpringRK4Animator extends Animator
stateBefore = {}
stateAfter = {}
# Calculate previous state
stateBefore.x = @_value - 1
stateBefore.v = @_velocity
# Calculate new state
stateAfter = @_integrator.integrateState stateBefore, delta
@_value = 1 + stateAfter.x
@@ -46,7 +46,7 @@ class exports.SpringRK4Animator extends Animator
# See if we reached the end state
netValueIsLow = Math.abs(netFloat) < @options.tolerance
netVelocityIsLow = Math.abs(net1DVelocity) < @options.tolerance
@_stopSpring = netValueIsLow and netVelocityIsLow
@_velocity = finalVelocity
@@ -5,19 +5,19 @@ Todo: make it work in a parent layer
"""
class exports.BackgroundLayer extends Layer
constructor: (options={}) ->
options.backgroundColor ?= "#fff"
super options
@sendToBack()
@layout()
@_context.domEventManager.wrap(window).addEventListener("resize", @layout)
layout: =>
if @parent
@frame = @parent.frame
else
@frame = @_context.frame
@frame = @_context.frame
View
@@ -53,7 +53,7 @@ class exports.BaseClass extends EventEmitter
Object.defineProperty(@prototype, propertyName, descriptor)
@simpleProperty = (name, fallback, options={}) ->
return _.extend options,
return _.extend options,
default: fallback
get: -> @_getPropertyValue(name)
set: (value) -> @_setPropertyValue(name, value)
@@ -66,7 +66,7 @@ class exports.BaseClass extends EventEmitter
get: ->
return unless _.isObject(@[objectKey])
Utils.getValueForKeyPath(@, keyPath)
set: (value) ->
set: (value) ->
return unless _.isObject(@[objectKey])
Utils.setValueForKeyPath(@, keyPath, value)
@@ -145,4 +145,4 @@ class exports.BaseClass extends EventEmitter
)
if not (value in [null, undefined])
@[key] = value
@[key] = value
View
@@ -2,7 +2,7 @@
{Events} = require "./Events"
class CanvasClass extends BaseClass
@define "width", get: -> window.innerWidth
@define "height", get: -> window.innerHeight
@define "size", get: -> {width:@width, height:@height}
@@ -24,12 +24,12 @@ class CanvasClass extends BaseClass
if eventName is "resize"
Events.wrap(window).addEventListener "resize", =>
@emit("resize")
super(eventName, listener)
on: @::addListener
onResize: (cb) -> @on("resize", cb)
# We use this as a singleton
exports.Canvas = new CanvasClass
exports.Canvas = new CanvasClass
Oops, something went wrong.

0 comments on commit 094286c

Please sign in to comment.