class Pettanr.SpeechBalloon extends Peta.Element url: '/speech_balloons/' @singular: () -> 'SpeechBalloon' @plural: () -> 'SpeechBalloons' defaults: { id: null, z: null, t: null } panel: () -> new Pettanr.Panel({id: @get('panel_id')}) 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 => @symbol_picture = sp.tmb_opt_img_tag() @trigger('ready:symbol') filer_caption: () -> @fetch({cache: true}).done => @caption_text = @escape('caption') @trigger('ready:caption') plain_scenario: () -> @get('caption') element_face: () -> new Pettanr.Views.SpeechBalloon.ElementFace({element: this}) initialize: () -> if @id @url = @url + @id