OSDN Git Service

e
[pettanr/pettanr.git] / app / models / panel.rb
index 28029ed..1c81e69 100644 (file)
@@ -1,5 +1,6 @@
 #コマ
 class Panel < Peta::Content
+  load_manifest
   belongs_to :author
   has_many :scroll_panels
   has_many :sheet_panels
@@ -67,6 +68,13 @@ class Panel < Peta::Content
     self.publish > 0
   end
   
+  # ground_picture element template 
+  def style_wh
+    {
+      'width' => self.width.to_s + 'px', 'height' => self.height.to_s + 'px'
+    }
+  end
+  
   def tag_id c = nil
     'panel' + self.tag_panel_id + c.to_s
   end