Permalink
Browse files

Removing unnecessary fat arrows

  • Loading branch information...
nvh committed Oct 27, 2016
1 parent 8b67479 commit bdd0656e7399a0d1b3a52d4bb21212f82a4b19fa
Showing with 8 additions and 8 deletions.
  1. +1 −1 framer/EventBuffer.coffee
  2. +1 −1 framer/Extras/Hints.coffee
  3. +2 −2 framer/LayerAnchor.coffee
  4. +1 −1 framer/MIDIInput.coffee
  5. +3 −3 framer/Utils.coffee
@@ -42,7 +42,7 @@ class exports.EventBuffer extends BaseClass
@define "events",
get: ->
timeout = Date.now() - @options.velocityTimeout
- return _.filter @_events, (event) => event.t > timeout
+ return _.filter @_events, (event) -> event.t > timeout
@define "angle",
get: ->
@@ -45,7 +45,7 @@ class Hints
showHints: ->
context = Framer.CurrentContext
- @_context.run => _.invokeMap(context.rootLayers, "_showHint")
+ @_context.run -> _.invokeMap(context.rootLayers, "_showHint")
destroy: ->
@_context.destroy()
@@ -6,7 +6,7 @@ top, right, bottom, left, centerX, centerY, center
calculateFrame = (layer, rules) ->
- val = (rule) =>
+ val = (rule) ->
value = rules[rule]
value = value() if _.isFunction(value)
return value
@@ -87,7 +87,7 @@ class LayerAnchor extends EventEmitter
_setNeedsUpdate: =>
@layer.frame = calculateFrame(@layer, @rules)
- _parseRules: =>
+ _parseRules: ->
return Utils.parseRect(Utils.arrayFromArguments(arguments))
exports.LayerAnchor = LayerAnchor
View
@@ -27,7 +27,7 @@ class MIDIInput extends BaseClass
# Failure handlers
- _requestRejected: (error) =>
+ _requestRejected: (error) ->
throw Error "Requesting MIDI access failed: #{error ? "not supported by browser"}"
# Event handlers
View
@@ -966,7 +966,7 @@ Utils.rotationNormalizer = ->
lastValue = null
- return (value) =>
+ return (value) ->
lastValue = value if not lastValue?
diff = lastValue - value
@@ -998,7 +998,7 @@ Utils.convertPointToContext = (point = {}, layer, rootContext=false, includeLaye
Utils.convertFrameToContext = (frame = {}, layer, rootContext=false, includeLayer=true) ->
frame = _.defaults(frame, {x:0, y:0, width:100, height:100})
corners = Utils.pointsFromFrame(frame)
- convertedCorners = corners.map (point) =>
+ convertedCorners = corners.map (point) ->
return Utils.convertPointToContext(point, layer, rootContext, includeLayer)
return Utils.frameFromPoints(convertedCorners)
@@ -1029,7 +1029,7 @@ Utils.convertPointFromContext = (point = {}, layer, rootContext=false, includeLa
Utils.convertFrameFromContext = (frame = {}, layer, rootContext=false, includeLayer=true) ->
frame = _.defaults(frame, {x:0, y:0, width:100, height:100})
corners = Utils.pointsFromFrame(frame)
- convertedCorners = corners.map (point) =>
+ convertedCorners = corners.map (point) ->
return Utils.convertPointFromContext(point, layer, rootContext, includeLayer)
return Utils.frameFromPoints(convertedCorners)

0 comments on commit bdd0656

Please sign in to comment.