1 class Pettanr.GroundPicture extends Peta.Element
\r
2 url: '/ground_pictures/'
\r
17 @repeat_texts: () ->
\r
18 ['repeat', 'repeat-x', 'repeat-y', 'no-repeat']
\r
21 new Pettanr.Picture({id: @get('picture_id')})
\r
26 style: (spot = null, opacity = 20) ->
\r
28 position: 'absolute',
\r
31 'z-index': @get('z'),
\r
32 'background-image': 'url(' + @picture().r_url() + ')',
\r
33 'background-repeat': @repeat_text(),
\r
34 'background-position': Pettanr.to_s(@get('x')) + 'px ' + Pettanr.to_s(@get('y')) + 'px'
\r
36 @merge_opacity(r, opacity) if spot and spot != this
\r
39 tmb_opt_img_tag: (picture) ->
\r
40 new Pettanr.Image.SymbolPicture({
\r
42 src: picture.r_url(),
\r
43 alt: @get('caption')
\r
48 symbol_option: (cb) ->
\r
52 cb(_this.tmb_opt_img_tag(i))
\r
55 Pettanr.GroundPicture.repeat_texts()[@get('repeat')]
\r
61 class Pettanr.GroundPicture.Collection extends Backbone.Collection
\r
62 model: Pettanr.GroundPicture
\r
63 url: '/ground_pictures'
\r