OSDN Git Service

t#31648:fix elm position
[pettanr/pettanr.git] / app / models / panel_picture.rb
index b28a0fc..57a3a4b 100644 (file)
@@ -63,7 +63,7 @@ class PanelPicture < ActiveRecord::Base
   end
   
   def opt_div_style
-    "z-index:#{self.z}; "
+    "top:#{self.y}px; left:#{self.x}px; z-index:#{self.z}; position: absolute;"
   end
   
   def opt_img_tag spot = nil, opacity = 20
@@ -71,7 +71,7 @@ class PanelPicture < ActiveRecord::Base
     {:id => self.tag_id(:img), :panel_id => self.tag_panel_id, :element_id => self.tag_element_id, :element_type => self.tag_element_type,
     :class => "panel-picture", :vPicture => self.id, 
     :src => self.url, :width => self.width.abs, :height => self.height.abs, :picture_id => self.picture_id, :ext => self.picture.ext, :alt => self.caption, 
-    :style => "top:#{self.y}px; left:#{self.x}px; z-index:#{self.z}; #{o}"}
+    :style => "#{o}"}
   end
   
   def tmb_opt_img_tag