1 class Pettanr.Views.GroundColor.Symbol extends Backbone.View
\r
7 initialize: (options) ->
\r
9 @class_name = options.class_name || 'face'
\r
12 @trigger('ready:symbol', symbol_picture)
\r
16 this.$el.addClass(@class_name)
\r
17 this.$el.html(@fore_color())
\r
19 style: Pettanr.to_style(@style())
\r
25 c = @item.get('code') ^ 0xffffff
\r
26 ('000000' + c.toString(16)).slice(-6)
\r
29 c = @item.get('code')
\r
30 ('000000' + c.toString(16)).slice(-6)
\r
32 style: (spot = null, opacity = 20) ->
\r
33 width = Manifest.manifest().magic_numbers['thumbnail_width']
\r
34 height = Manifest.manifest().magic_numbers['thumbnail_height']
\r
36 width: Pettanr.to_s(width) + 'px',
\r
37 height: Pettanr.to_s(height) + 'px',
\r
38 color: '#' + @fore_color()
\r
39 'background-color': '#' + @bg_color()
\r