OSDN Git Service

t#31524:fix spotting on panel
[pettanr/pettanr.git] / app / models / ground_picture.rb
index 086e5dd..6ed5f98 100644 (file)
@@ -31,8 +31,8 @@ class GroundPicture < ActiveRecord::Base
   end
   
   def opt_div_style full_url, spot = nil, opacity = 20
-    o = spot and spot != self ? "opacity: #{opacity.to_f/100}; filter:alpha(opacity=#{opacity});" : ''
-    "width:#{self.panel.width}px; height:#{self.panel.height}px; z-index:#{self.z}; background-image: url(#{full_url}); background-repeat: #{self.repeat_text}; background-position: #{self.x}px, #{self.y}px; #{o}"
+    o = (spot and spot != self) ? "opacity: #{opacity.to_f/100}; filter:alpha(opacity=#{opacity});" : ''
+    "position: absolute; width:#{self.panel.width}px; height:#{self.panel.height}px; top: 0px; left: 0px;  z-index:#{self.z}; background-image: url(#{full_url}); background-repeat: #{self.repeat_text}; background-position: #{self.x}px, #{self.y}px; #{o}"
   end
   
   def tmb_opt_img_tag