OSDN Git Service

add: license publisher
[pettanr/pettanr.git] / app / models / speech.rb
index 1073cdf..24cb701 100644 (file)
@@ -31,6 +31,7 @@ class Speech < Peta::Element
     self.y = 0
     self.width = 100
     self.height = 100
+    self.fore_color = 0
   end
   
   def symbol_option
@@ -39,8 +40,8 @@ class Speech < Peta::Element
   
   def outer_style
     {
-      'top' => self.y, 'left' => self.x
-      'width' => self.width, 'height' => self.height
+      'top' => self.y.to_s + '%', 'left' => self.x.to_s + '%'
+      'width' => self.width.to_s + '%', 'height' => self.height.to_s + '%'
     }
   end
   
@@ -56,7 +57,7 @@ class Speech < Peta::Element
     @@text_align_texts[self.text_align]
   end
   
-  def self.public_list_where
+  def self.public_list_where list
     'panels.publish > 0'
   end
   
@@ -74,17 +75,13 @@ class Speech < Peta::Element
     {:include => {:speech_balloon => {:panel => {:author => {}}, :balloon => {}, :speech_balloon_template => {} }}}
   end
   
-  def self.panelize speech_attributes
-    {'speech_attributes' => speech_attributes}
-  end
-  
   def scenario
     self.boosts 'read'
     self.render
   end
   
   def plain_scenario
-    self.content + "\n"
+    self.content.to_s + "\n"
   end
   
   def feed