OSDN Git Service

#31540:try sort
[pettanr/pettanr.git] / app / views / panels / _body.html.erb
index 3e813b5..3a024aa 100644 (file)
@@ -1,12 +1,14 @@
-<div class="pettanr-comic-panel" style="width:<%= panel.width %>px;height:<%= panel.height %>px;border-style: solid;border-width: <%= panel.border %>px;border-color:black; background-color:white;">
+<div id="panel<%= panel.id -%>" class="pettanr-comic-panel" style="width:<%= panel.width %>px;height:<%= panel.height %>px;border-style: solid;border-width: <%= panel.border %>px;border-color:black; background-color:white;">
   <% panel.panel_elements.each do |elm| %>
     <% case elm.class.to_s %>
     <% when 'PanelPicture' %>
-      <%= link_to_unless(elm.link.blank?, tag(:img, elm.opt_img_tag(spot)), elm.link) %>
+      <div id="vpicture<%= elm.id -%>">
+        <%= link_to_unless(elm.link.blank?, tag(:img, elm.opt_img_tag(spot)), elm.link) %>
+      </div>
     <% when 'SpeechBalloon' %>
       <div id="vballoon<%= elm.id -%>" class="pettanr-comic-balloon" style="width:<%= elm.balloon.width -%>px; height:<%= elm.balloon.height -%>px; top:<%= elm.balloon.y -%>px; left:<%= elm.balloon.x -%>px; z-index:<%= elm.z -%>; ">
-        <img src="<%= elm.balloon.system_picture.url -%>" alt="<%= elm.caption -%>">
-        <p style="top:<%= elm.speech.y -%>px; left:<%= elm.speech.x -%>px;width:<%= elm.speech.width -%>px; height:<%= elm.speech.height -%>px;">
+        <img id="balloon<%= elm.id -%>" src="<%= elm.balloon.system_picture.url -%>" alt="<%= elm.caption -%>">
+        <p style="top:<%= elm.speech.y -%>%; left:<%= elm.speech.x -%>%;width:<%= elm.speech.width -%>%; height:<%= elm.speech.height -%>%;">
           <span><%= h elm.speech.content -%></span>
         </p>
       </div>