class Pettanr.SpeechBalloon extends Peta.Element url: '/speech_balloons/' @singular: () -> 'SpeechBalloon' @plural: () -> 'SpeechBalloons' defaults: { id: null, z: null, t: null } panel: (options = {}) -> new Pettanr.Panel({id: @get('panel_id')}, options) speech_balloon_template: () -> new Pettanr.SpeechBalloonTemplate({id: @get('speech_balloon_template_id')}) @has_picture: () -> false symbol_option: () -> sbt = @speech_balloon_template() sbt.fetch({cache: true}).done => sp = sbt.system_picture() sp.fetch({cache: true}).done => @trigger('ready:symbol', sp.tmb_opt_img_tag()) filer_caption: () -> @fetch({cache: true}).done => caption = @escape('caption') @trigger('ready:caption', caption) plain_scenario: () -> @get('caption') element_face: () -> new Pettanr.Views.SpeechBalloon.ElementFace({element: this}) initialize: () -> if @id @url = @url + @id