class Pettanr.SpeechBalloon extends Peta.Element @singular: () -> 'SpeechBalloon' @plural: () -> 'SpeechBalloons' defaults: { id: null, z: null, t: null } @pick_item_name: () -> 'speech_balloon_template' @traceable_item_names: () -> ['speech', 'balloon'] pick: () -> # speech_balloon_template = @templates.speech_balloon_template { speech_balloon_template_id: speech_balloon_template.get('id'), speech_balloon_template_module_name: speech_balloon_template.get('module_name') } @trace_routes: () -> { symbol: ['speech_balloon_template', 'system_picture'], } @has_picture: () -> false filer_caption: (context, options) -> @get_child('balloon', this, { success: (balloon) => @get_child('speech', this, { success: (speech) => plain_scenario = @plain_scenario() + balloon.plain_scenario() + speech.plain_scenario() options.success.call(context, plain_scenario) fail: (response, opt) => options.fail.call(context, response, opt) }) fail: (response, opt) => options.fail.call(context, response, opt) }) plain_scenario: () -> @escape('caption') element_face: () -> new Pettanr.Views.SpeechBalloon.ElementFace({element: this}) initialize: (attr, options) -> super(attr, options)