1 class Pettanr.GroundColor extends Peta.Element
\r
2 url: '/ground_colors/'
\r
31 if @get('orientation') == 0
\r
37 if @get('orientation') == 0
\r
43 if @get('orientation') == 0
\r
49 if @get('orientation') == 0
\r
54 style: (spot = null, opacity = 20) ->
\r
56 position: 'absolute',
\r
57 'z-index': @get('z'),
\r
58 top: Pettanr.to_s(@div_y()) + '%',
\r
59 left: Pettanr.to_s(@div_x()) + '%',
\r
60 width: Pettanr.to_s(@div_width()) + '%',
\r
61 height: Pettanr.to_s(@div_height()) + '%',
\r
62 'background-color': '#' + ('000000' + Pettanr.to_s(@get('code'))).slice(-6)
\r
64 @merge_opacity(r, opacity) if spot and spot != this
\r
71 class Pettanr.GroundColor.Collection extends Backbone.Collection
\r
72 model: Pettanr.GroundColor
\r
73 url: '/ground_colors'
\r