1 class Pettanr.SpeechBalloon extends Peta.Element
\r
15 @pick_item_name: () ->
\r
16 'speech_balloon_template'
\r
18 @traceable_item_names: () ->
\r
19 ['speech', 'balloon']
\r
23 speech_balloon_template = @templates.speech_balloon_template
\r
25 speech_balloon_template_id: speech_balloon_template.get('id'),
\r
26 speech_balloon_template_module_name: speech_balloon_template.get('module_name')
\r
29 @trace_routes: () ->
\r
31 symbol: ['speech_balloon_template', 'system_picture'],
\r
37 filer_caption: (context, options) ->
\r
38 @get_child('balloon', this, {
\r
39 success: (balloon) =>
\r
40 @get_child('speech', this, {
\r
41 success: (speech) =>
\r
42 plain_scenario = @plain_scenario() + balloon.plain_scenario() + speech.plain_scenario()
\r
43 options.success.call(context, plain_scenario)
\r
44 fail: (response, opt) =>
\r
45 options.fail.call(context, response, opt)
\r
47 fail: (response, opt) =>
\r
48 options.fail.call(context, response, opt)
\r
51 plain_scenario: () ->
\r
55 new Pettanr.Views.SpeechBalloon.ElementFace({element: this})
\r
57 initialize: (attr, options) ->
\r
58 super(attr, options)
\r