OSDN Git Service

t#31896:refact elm
[pettanr/pettanr.git] / app / views / speech_balloons / _element.html.erb
index e213df8..7839a48 100644 (file)
@@ -1,7 +1,7 @@
-<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_part_id -%>" speech_id="<%= elm.speech.tag_element_part_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 -%>">
+<div <%= raw elm.any_tag_attr() -%> balloon_id="<%= elm.balloon.tag_element_part_id -%>" speech_id="<%= elm.speech.tag_element_part_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 <%= raw elm.balloon.tag_attr -%> class="pettanr-balloon" src="<%= elm.balloon.system_picture.url -%>" alt="<%= elm.caption -%>">
   <div class="pettanr-comic-speech" style="top:<%= elm.speech.y -%>%; left:<%= elm.speech.x -%>%;width:<%= elm.speech.width -%>%; height:<%= elm.speech.height -%>%;">
-    <div class="pettanr-comic-speech-inner" id="<%= elm.speech.tag_id -%>" panel_id="<%= elm.speech.tag_panel_id -%>" element_id="<%= elm.speech.tag_element_id -%>" element_type="<%= elm.speech.tag_element_type -%>" element_part_id="<%= elm.speech.tag_element_part_id -%>" element_part_type="<%= elm.speech.tag_element_part_type -%>"style="font-size:<%= elm.speech.font_size -%>em; text-align:<%= elm.speech.text_align_text -%>; color:#<%= format("%06x", elm.speech.fore_color) -%>;">
+    <div class="pettanr-comic-speech-inner" <%= raw elm.speech.tag_attr -%> style="font-size:<%= elm.speech.font_size -%>em; text-align:<%= elm.speech.text_align_text -%>; color:#<%= format("%06x", elm.speech.fore_color) -%>;">
       <%= simple_format(elm.speech.content) -%>
     </div>
   </div>