Skip to content

Commit

Permalink
For now, setting this to a Layer function for safety.
Browse files Browse the repository at this point in the history
  • Loading branch information
John Marstall committed Jul 28, 2017
1 parent 8734cff commit 22a49be
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions FocusEngine.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,8 @@
fe.debug = true
###

overrides =
up: null
down: null
left: null
right: null

# all layers receive default empty overrides
Layer::overrides = overrides
Layer::setOverrides = (options = {}) ->
@.overrides = options

exports.debug = false

Expand All @@ -98,7 +92,6 @@ exports.focusStyle =
shadowY: 0
shadowSpread: 0

# unfocus style
exports.unfocusStyle =
shadowBlur: 20
shadowColor: "rgba(0,0,0,0)"
Expand All @@ -110,6 +103,12 @@ exports.unfocusStyle =
exports.initialize = (focusableArray) ->
exports.focusable = focusableArray
for layer in exports.focusable
if layer.overrides == undefined
layer.overrides =
up: null
down: null
left: null
right: null
layer.focus = false
styleLayer(layer)

Expand Down

0 comments on commit 22a49be

Please sign in to comment.