1 class Pettanr.Views.GroundColor.Symbol extends Backbone.View
\r
4 initialize: (options) ->
\r
6 @class_name = options.class_name || 'face'
\r
9 this.$el.addClass(@class_name)
\r
10 this.$el.html(@fore_color())
\r
12 style: Pettanr.to_style(@style())
\r
18 c = @item.get('code') ^ 0xffffff
\r
19 ('000000' + c.toString(16)).slice(-6)
\r
22 c = @item.get('code')
\r
23 ('000000' + c.toString(16)).slice(-6)
\r
25 style: (spot = null, opacity = 20) ->
\r
26 width = Manifest.manifest().magic_numbers['thumbnail_width']
\r
27 height = Manifest.manifest().magic_numbers['thumbnail_height']
\r
29 width: Pettanr.to_s(width) + 'px',
\r
30 height: Pettanr.to_s(height) + 'px',
\r
31 color: '#' + @fore_color()
\r
32 'background-color': '#' + @bg_color()
\r