1 class Pettanr.Views.GroundColor.Symbol extends Pettanr.View
\r
4 initialize: (options) ->
\r
6 @class_name = options.class_name || 'face'
\r
9 @trigger('ready:symbol', symbol_picture)
\r
13 this.$el.addClass(@class_name)
\r
14 this.$el.html(@bg_color())
\r
16 style: Pettanr.to_style(@style())
\r
19 @delegateEvents({'click': @click})
\r
23 c = @item.get('code') ^ 0xffffff
\r
24 ('000000' + c.toString(16)).slice(-6)
\r
27 c = @item.get('code')
\r
28 ('000000' + c.toString(16)).slice(-6)
\r
30 style: (spot = null, opacity = 20) ->
\r
31 width = Manifest.manifest().magic_numbers['thumbnail_width']
\r
32 height = Manifest.manifest().magic_numbers['thumbnail_height']
\r
34 width: Pettanr.to_s(width) + 'px',
\r
35 height: Pettanr.to_s(height) + 'px',
\r
36 color: '#' + @fore_color()
\r
37 'background-color': '#' + @bg_color()
\r