X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=app%2Fassets%2Fjavascripts%2Fmodels%2Fsystem_picture.js.coffee;h=bd5daa6daf2bc49eebcf20761a277b28528afd2f;hb=6cbe57ca7a9cac83fad2f3c66fa097055c1fe803;hp=82e60c8e0f2f6b13998386b6e95a503fc68349b7;hpb=458e6cecccbd13b65838495bffaa9614652b851f;p=pettanr%2Fpettanr.git diff --git a/app/assets/javascripts/models/system_picture.js.coffee b/app/assets/javascripts/models/system_picture.js.coffee index 82e60c8e..bd5daa6d 100644 --- a/app/assets/javascripts/models/system_picture.js.coffee +++ b/app/assets/javascripts/models/system_picture.js.coffee @@ -24,11 +24,17 @@ class Pettanr.SystemPicture extends Peta.SystemResource {src: @r_url(), width: @get('width'), height: @get('height')} tmb_opt_img_tag: () -> - wh = Pettanr.Imager.thumbnail_size(@get('width'), @get('height')) - {src: @r_url(), width: wh[0], height: wh[1]} - - symbol_option: () -> - @tmb_opt_img_tag() + new Pettanr.Image.SymbolPicture({ + attr: { + src: @r_url() + }, + picture: this + }) + + symbol_option: (cb) -> + _this = this + this.fetch().done -> + cb(_this.tmb_opt_img_tag()) initialize: () -> if @id