Set back up highlight mark.

This commit is contained in:
Scott Erickson 2014-09-26 13:58:35 -07:00
parent 2505f50eec
commit f21083acf5
2 changed files with 6 additions and 4 deletions

View file

@ -594,10 +594,9 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
@marks[effects[@effectIndex]].show()
setHighlight: (to, delay) ->
# TODO: get highlights working again
# @addMark 'highlight', @options.floatingLayer, 'highlight' if to
# @marks.highlight?.highlightDelay = delay
# @marks.highlight?.toggle to and not @dimmed
@addMark 'highlight', @options.floatingLayer, 'highlight' if to
@marks.highlight?.highlightDelay = delay
@marks.highlight?.toggle to and not @dimmed
setDimmed: (@dimmed) ->
@marks.highlight?.toggle @marks.highlight.on and not @dimmed

View file

@ -143,6 +143,9 @@ module.exports = LayerAdapter = class LayerAdapter extends CocoClass
#- Adding, removing children for WebGL layers.
addCocoSprite: (cocoSprite) ->
# TODO: Move this into the production DB rather than setting it dynamically.
if cocoSprite.thangType?.get('name') is 'Highlight'
cocoSprite.thangType.set('spriteType', 'segmented')
cocoSprite.options.resolutionFactor = @resolutionFactor
if cocoSprite.layer
console.warn 'CocoSprite being re-added to a layer?'