1 class Pettanr.Speech extends Peta.Element
\r
19 speech_balloon_template = @templates.speech_balloon_template
\r
20 writing_format = @templates.writing_format
\r
22 speech_balloon_template_id: speech_balloon_template.get('id'),
\r
23 speech_balloon_template_module_name: speech_balloon_template.get('module_name'),
\r
24 writing_format_id: writing_format.get('id'),
\r
25 writing_format_module_name: writing_format.get('module_name'),
\r
28 speech_balloon: () ->
\r
29 new Pettanr.Cache.Retriever(Pettanr.SpeechBalloon, @get('speech_balloon_id'))
\r
31 writing_format: () ->
\r
32 new Pettanr.Cache.Retriever(Pettanr.WritingFormat, @get('writing_format_id'))
\r
34 @text_align_texts: () ->
\r
35 ['left', 'left', 'right', 'center']
\r
37 symbol_option: () ->
\r
38 @get_parent('speech_balloon', this, {
\r
39 success: (speech_balloon) =>
\r
40 speech_balloon.get_parent('speech_balloon_template', this, {
\r
41 success: (speech_balloon_template) =>
\r
42 speech_balloon_template.get_parent('system_picture', this, {
\r
43 success: (system_picture) =>
\r
44 @trigger('ready:symbol', system_picture.tmb_opt_img_tag())
\r
49 text_align_text: () ->
\r
50 Pettanr.Speech.text_align_texts()[@get('text_align')]
\r
54 @render(@escape('content'))
\r
56 initialize: (attr, options) ->
\r
57 super(attr, options)
\r