+<% panel.panel_elements.each do |elm| %>
+ <% case elm.class.to_s %>
+ <% when 'SpeechBalloon' %>
+ <%
+ speech_balloon = elm
+ speech_balloon_template = speech_balloon.speech_balloon_template
+ balloon = speech_balloon.balloon
+ speech = speech_balloon.speech
+ speech_balloon.extend speech_balloon_template.engine_speech_balloon_module
+ balloon.extend speech_balloon_template.engine_balloon_module
+ speech.extend speech_balloon_template.engine_speech_module
+
+ balloon.new_speech_balloon = speech_balloon
+ speech.new_speech_balloon = speech_balloon
+
+ %>
+ <% end %>
+<% end %>
<div id="<%= panel.tag_id -%>" panel_id="<%= panel.tag_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 %>
<%= link_to_unless(elm.link.blank?, tag(:img, elm.opt_img_tag(spot)), elm.link) %>
</div>
<% when 'SpeechBalloon' %>
- <% next unless elm.balloon or elm.speech %>
<div id="<%= elm.tag_id -%>" panel_id="<%= elm.tag_panel_id -%>" element_id="<%= elm.tag_element_id -%>" element_type="<%= elm.tag_element_type -%>" balloon_id="<%= elm.balloon.tag_element_id -%>" speech_id="<%= elm.speech.tag_element_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 id="<%= elm.balloon.tag_id -%>" panel_id="<%= elm.balloon.tag_panel_id -%>" element_id="<%= elm.balloon.tag_element_id -%>" element_type="<%= elm.balloon.tag_element_type -%>" element_part_id="<%= elm.balloon.tag_element_part_id -%>" element_part_type="<%= elm.balloon.tag_element_part_type -%>" class="pettanr-balloon" 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 -%>%;">
speech_balloon_template = speech_balloon.speech_balloon_template
balloon = speech_balloon.balloon
speech = speech_balloon.speech
- speech_balloon.extend speech_balloon_template.engine_speech_balloon_module
- balloon.extend speech_balloon_template.engine_balloon_module
- speech.extend speech_balloon_template.engine_speech_module
speech_balloon_extend = speech_balloon.extend_speech_balloon
balloon_extend = balloon.extend_balloon