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
20 @pick_item_name: () ->
\r
24 Manifest.item_name_to_model(@pick_item_name())
\r
26 @traceable_item_names: () ->
\r
27 ['panel_picture', 'picture']
\r
29 @is_traceable: (item_name) ->
\r
30 _.contains(@traceable_item_names(), item_name)
\r
32 trace_from_panel_picture: () ->
\r
34 trace_from_picture: () ->
\r
36 pick: (picked_item) ->
\r
37 {picture_id: picked_item.get('picture_id')}
\r
39 panel: (options = {}) ->
\r
40 new Pettanr.Panel({id: @get('panel_id')}, options)
\r
43 new Pettanr.Picture({id: @get('picture_id')})
\r
48 tmb_opt_img_tag: (picture) ->
\r
49 new Pettanr.Image.SymbolPicture({
\r
51 src: picture.r_url(),
\r
52 alt: @escape('caption')
\r
57 symbol_option: () ->
\r
59 i.fetch({cache: true}).done =>
\r
60 @trigger('ready:symbol', i.tmb_opt_img_tag())
\r
63 Pettanr.GroundPicture.repeat_texts()[@get('repeat')]
\r
66 new Pettanr.Views.GroundPicture.ElementFace({element: this})
\r
68 initialize: (attr, options) ->
\r
69 super(attr, options)
\r