1 class Pettanr.GroundPicture extends Peta.Element
\r
15 @repeat_texts: () ->
\r
16 ['repeat', 'repeat-x', 'repeat-y', 'no-repeat']
\r
24 style: (spot = null, opacity = 20) ->
\r
26 position: 'absolute',
\r
29 'z-index': @get('z'),
\r
30 'background-image': 'url(' + @picture().r_url() + ')',
\r
31 'background-repeat': @repeat_text(),
\r
32 'background-position': Pettanr.to_s(@get('x')) + 'px ' + Pettanr.to_s(@get('y')) + 'px'
\r
34 @merge_opacity(r, opacity) if spot and spot != this
\r
37 tmb_opt_img_tag: () ->
\r
38 wh = Pettanr.Imager.thumbnail_size(@picture().get('width'), @picture().get('height'))
\r
39 {src: @picture().r_url(), width: wh[0], height: wh[1], alt: @get('caption')}
\r
41 symbol_option: () ->
\r
45 Pettanr.GroundPicture.repeat_texts()[@get('repeat')]
\r
51 class Pettanr.GroundPicture.Collection extends Backbone.Collection
\r
52 model: Pettanr.GroundPicture
\r
53 url: '/ground_pictures'
\r