@spot = options.spot\r
@speech_balloon = options.parent\r
\r
- clear: () ->\r
- this\r
- \r
render: () ->\r
this.$el.html('')\r
- @element.get_parent('system_picture', this, {\r
- success: (@system_picture) =>\r
- @init_picture()\r
- @set_style()\r
- })\r
+ @set_style()\r
+ this\r
\r
init_picture: () ->\r
\r
set_style: () ->\r
attr = {\r
- src: @system_picture.r_url(), \r
- alt: @element.get('caption'),\r
+ src: @system_picture.picture_file().src(), \r
+ alt: @speech_balloon.element.get('caption'),\r
style: Pettanr.to_style(@style())\r
}\r
this.$el.attr(attr)\r
'z-index': 1 # play case\r
}\r
\r
- add_element: (element) ->\r
- null\r
- \r
class Pettanr.Views.Balloon.Element.Edit extends Pettanr.Views.Balloon.Element\r
\r
initialize: (options) ->\r
super(options)\r
+ \r
+ init_picture: () ->\r
@listenTo(@element, 'input:system_picture_id', @input_r)\r
@listenTo(@element, 'input:width', @resize)\r
@listenTo(@element, 'input:height', @resize)\r
- \r
- init_picture: () ->\r
sb = @speech_balloon\r
elm = @element\r
this.$el.resizable {\r
}\r
\r
input_r: () ->\r
- @render()\r
- resize_div = this.$el.parent()\r
- resize_div.css('z-index', 1)\r
+ @element.get_parent('system_picture', this, {\r
+ success: (@system_picture) =>\r
+ @set_style()\r
+ #resize_div = this.$el.parent()\r
+ #resize_div.css('z-index', 1)\r
+ })\r
\r
resize: () ->\r
resize_div = this.$el.parent()\r