Permalink
Browse files

!= to isnt

  • Loading branch information...
nvh committed Sep 14, 2016
1 parent 38a56ff commit cbd8339e125366a6225f8b4024d774c02d1f003a
View
@@ -81,7 +81,7 @@ class exports.Animation extends BaseClass
v = evaluateRelativeProperty(@_target, k, v)
# Filter out the properties that are equal
@_stateB[k] = v if @_stateA[k] != v
@_stateB[k] = v if @_stateA[k] isnt v
if _.keys(@_stateA).length is 0
console.warn "Animation: nothing to animate, no animatable properties"
View
@@ -195,11 +195,11 @@ class exports.Color extends BaseClass
if colorA not instanceof Color and colorB instanceof Color
colorA = colorB.transparent()
else if colorA instanceof Color and colorA._a == 0 and colorB instanceof Color and colorB._a != 0
else if colorA instanceof Color and colorA._a == 0 and colorB instanceof Color and colorB._a isnt 0
colorA = colorB.transparent()
else if colorB not instanceof Color and colorA instanceof Color
colorB = colorA.transparent()
else if colorB instanceof Color and colorB._a == 0 and colorA instanceof Color and colorA._a != 0
else if colorB instanceof Color and colorB._a == 0 and colorA instanceof Color and colorA._a isnt 0
colorB = colorA.transparent()
if colorB instanceof Color
@@ -279,7 +279,7 @@ class exports.Color extends BaseClass
@isColorString: (colorString) ->
if _.isString(colorString)
return stringToObject(colorString) != false
return stringToObject(colorString) isnt false
return false
@isValidColorProperty: (name, value) ->
@@ -397,7 +397,7 @@ inputData = (color, g, b, alpha) ->
a = correctAlpha(a)
if type != ColorType.HSL
if type isnt ColorType.HSL
hsl = rgbToHsl(rgb.r, rgb.g, rgb.b)
return {
@@ -516,11 +516,11 @@ bound01 = (n, max) ->
isOnePointZero = (n) ->
return typeof n == "string" and n.indexOf(".") != -1 and parseFloat(n) == 1
return typeof n == "string" and n.indexOf(".") isnt -1 and parseFloat(n) == 1
# Check to see if string passed in is a percentage
isPercentage = (n) ->
return typeof n == "string" and n.indexOf("%") != -1
return typeof n == "string" and n.indexOf("%") isnt -1
# Force hex to have 2 characters.
pad2 = (char) ->
@@ -500,7 +500,7 @@ class exports.DeviceComponent extends BaseClass
@viewport.props = contentProperties
@_update()
@handsImageLayer.image = "" if @_orientation != 0
@handsImageLayer.image = "" if @_orientation isnt 0
@emit("change:orientation", @_orientation)
@@ -406,7 +406,7 @@ class exports.GestureInputRecognizer
# For delta we switch to center-compare if there are two fingers
if @session?.lastEvent
# If we just switched fingers, we skip the delta event entirely
if event.fingers != @session.lastEvent.fingers == 2
if event.fingers isnt @session.lastEvent.fingers == 2
event.delta = {x:0, y:0}
# If we are having two finger events, we use the touchCenter as base for delta
if event.fingers == 2 and @session.lastEvent.fingers == 2
View
@@ -22,7 +22,7 @@ getScaleFromName = (str) ->
re = /@([\d]+|[\d]+.[\d]+)x/
m = undefined
if (m = re.exec(str)) != null
if (m = re.exec(str)) isnt null
return parseFloat(m[1]) if m[1]
return null
@@ -147,11 +147,11 @@ class exports.Importer
layer.__framerImportedFromPath = @path
# Set scroll to true if scroll is in the layer name
if layerInfo.name.toLowerCase().indexOf("scroll") != -1
if layerInfo.name.toLowerCase().indexOf("scroll") isnt -1
layer.scroll = true
# Set draggable enabled if draggable is in the name
if layerInfo.name.toLowerCase().indexOf("draggable") != -1
if layerInfo.name.toLowerCase().indexOf("draggable") isnt -1
layer.draggable.enabled = true
# A layer without an image, mask or children should be zero
View
@@ -46,7 +46,7 @@ layerProperty = (obj, name, cssProperty, fallback, validator, transformer, optio
@_properties[name] = value
if cssProperty != null
if cssProperty isnt null
@_element.style[cssProperty] = LayerStyle[cssProperty](@)
set?(@, value)
@@ -890,7 +890,7 @@ class exports.Layer extends BaseClass
if @_stateMachine.previousName is @_stateMachine.currentName
shouldChange = false
for property,value of properties
if @[property] != value
if @[property] isnt value
shouldChange = true
break
if not shouldChange
@@ -303,8 +303,8 @@ class exports.LayerDraggable extends BaseClass
@define "isBeyondConstraints",
get: ->
constraintsOffset = @constraintsOffset
return true if constraintsOffset.x != 0
return true if constraintsOffset.y != 0
return true if constraintsOffset.x isnt 0
return true if constraintsOffset.y isnt 0
return false
_clampAndScale: (value, min, max, scale) ->
View
@@ -92,7 +92,7 @@ exports.LayerStyle =
css = []
for [cssName, layerName, fallback, unit] in _WebkitProperties
if layer._properties.hasOwnProperty(layerName) and layer[layerName] != fallback
if layer._properties.hasOwnProperty(layerName) and layer[layerName] isnt fallback
css.push("#{cssName}(#{filterFormat(layer[layerName], unit)})")
return css.join(" ")
View
@@ -8,7 +8,7 @@ class MIDIInput extends BaseClass
@define "enabled",
get: -> @_inputs?.length or @_request
set: (value) ->
return unless value != @enabled
return unless value isnt @enabled
return @_requestRejected() if not navigator.requestMIDIAccess
if value
@_request = navigator.requestMIDIAccess().then @_requestResolved, @_requestRejected
View
@@ -22,7 +22,7 @@ Utils.setValueForKeyPath = (obj, path, val) ->
result = obj
i = 0
n = fields.length
while i < n and result != undefined
while i < n and result isnt undefined
field = fields[i]
if i == n - 1
result[field] = val
@@ -207,7 +207,7 @@ Utils.inspectObjectType = (item) ->
# This is a hacky way to get nice object names, it tries to
# parse them from the .toString methods for objects.
if item.constructor?.name? and item.constructor?.name != "Object"
if item.constructor?.name? and item.constructor?.name isnt "Object"
return item.constructor.name
extract = (str) ->
@@ -356,7 +356,7 @@ Utils.isRelativeUrl = (url) ->
!/^([a-zA-Z]{1,8}:\/\/).*$/.test(url)
Utils.isLocalServerUrl = (url) ->
return url.indexOf("127.0.0.1") != -1 or url.indexOf("localhost") != -1
return url.indexOf("127.0.0.1") isnt -1 or url.indexOf("localhost") isnt -1
Utils.isLocalUrl = (url) ->
return true if Utils.isFileUrl(url)
@@ -370,7 +370,7 @@ Utils.isLocalAssetUrl = (url, baseUrl) ->
return false
Utils.isFramerStudio = ->
navigator.userAgent.indexOf("FramerStudio") != -1
navigator.userAgent.indexOf("FramerStudio") isnt -1
Utils.framerStudioVersion = ->
@@ -920,7 +920,7 @@ Utils.pointInPolygon = (point, vs) ->
yi = vs[i][1]
xj = vs[j][0]
yj = vs[j][1]
intersect = yi > y != yj > y and x < (xj - xi) * (y - yi) / (yj - yi) + xi
intersect = yi > y isnt yj > y and x < (xj - xi) * (y - yi) / (yj - yi) + xi
if intersect
inside = !inside
j = i++
@@ -21,7 +21,7 @@ describe "ExternalDocument", ->
jsonA = JSON.stringify dataA, null, "\t"
jsonB = JSON.stringify dataB, null, "\t"
if jsonA != jsonB
if jsonA isnt jsonB
# Uncomment this to see current dump
console.log ""
console.log "Name: #{name}"

0 comments on commit cbd8339

Please sign in to comment.