asp.net - Why am I getting a different in div location? -
so i've created image tagger saves coordinates the database, , call coordinates erb block on main page displays div @ said location (.tagged). when tags displayed on main page, not in location in when tagged them in connections page. have ideas why is? in advance.
image tagger on connections page
erb on main page:
<% if @new_manual.present? %> <% n = 0 %> <% @new_manual.steps.each |step| %> <% n += 1 %> <% i_connection = contact.find(step.input_contact) %> <span class="i_contact i_contact<%= n %>" data-pos-x="<%= i_connection.pos_x %>" data-pos-y="<%= i_connection.pos_y %>" data-pos-width="<%= i_connection.pos_width %>" data-pos-height="<%= i_connection.pos_height %>" ="spanid<%= n %>" data-index="<%= n %>"></span> <% o_connection = contact.find(step.output_contact) %> <span class="o_contact o_contact<%= n %>" data-pos-x="<%= o_connection.pos_x %>" data-pos-y="<%= o_connection.pos_y %>" data-pos-width="<%= o_connection.pos_width %>" data-pos-height="<%= o_connection.pos_height %>" id="spanid<%= n %>" data-index="<%= n %>"> </span> <% cord = cordtype.find(step.contact_item) %> <div class="main_panel"> <div style='margin: auto; width: 600px;'> <div id="image_panel<%= n %>" style="float:left; width:600px; position:relative;"> <%= image_tag(i_connection.image.image.url(:large)) %> <div class="i_tagmap<%= n %>"></div> </div> </div> </div> <div class="main_panel"> <div style='margin: auto; width: 600px;'> <div id="image_panel<%= n %>" style="float:left; width:600px; position:relative;"> <%= image_tag(o_connection.image.image.url(:large)) %> <div class="o_tagmap<%= n %>"></div> </div> </div> </div> <% end %> <% end %>
Comments
Post a Comment