x,y uložené v opravě (nemusíme tahat z čáry (pointru))

This commit is contained in:
Jonas Havelka 2025-01-21 09:28:46 +01:00
parent 87466ce2b6
commit e257f31ea5

View file

@ -46,6 +46,8 @@ function place_comments_one_div(img_id, comments)
el.pointer = elp;
el.img_id = img_id;
el.x = x
el.y = y
el.style.position = 'absolute';
el.style.left = w + w_skip;
el.style.top = y + delta_y;
@ -101,22 +103,16 @@ function toggle_visibility(oprava){
// show comment form, when 'comment' button pressed
function comment(op)
{
var divpointer = op.pointer;
var dx = parseInt(divpointer.style.left);
var dy = parseInt(divpointer.style.top);
return show_form(op.img_id, dx, dy, op.dataset.opid, "", "comment");
return show_form(op.img_id, op.x, op.y, op.dataset.opid, "", "comment");
}
// show comment form when 'update-comment' button pressed
function update_comment(oid,ktid)
{
var divbox = document.getElementById(oid);
var divpointer = divbox.pointer;
var dx = parseInt(divpointer.style.left);
var dy = parseInt(divpointer.style.top);
var text = document.getElementById(ktid).textContent;
return show_form(divbox.img_id, dx, dy, ktid.substring(2), text, 'update-comment');
return show_form(divbox.img_id, divbox.x, divbox.y, ktid.substring(2), text, 'update-comment');
}
function oprava_onmouseover(op)