Closed er-chaan closed 3 years ago
after doing r&d with canvas properties and style.css issue sorted
Hey @er-chaan,
Could you share which solution worked for you? I remember having this same issue on & off
For anyone encountering the same issue this is what worked for me.
In the js file line 328 i removed the absy variable. Not sure if it was required or not but it is what worked for me.
Replaced line 328 with the line given below.
blockstemp.filter(a => a.id == parseInt(drag.querySelector(".blockid").value))[0].y = (drag.getBoundingClientRect().top + window.scrollY) + (parseInt(window.getComputedStyle(drag).height) / 2) + canvas_div.scrollTop - canvas_div.getBoundingClientRect().top;
For anyone encountering the same issue this is what worked for me.
In the js file line 328 i removed the absy variable. Not sure if it was required or not but it is what worked for me.
Replaced line 328 with the line given below.
blockstemp.filter(a => a.id == parseInt(drag.querySelector(".blockid").value))[0].y = (drag.getBoundingClientRect().top + window.scrollY) + (parseInt(window.getComputedStyle(drag).height) / 2) + canvas_div.scrollTop - canvas_div.getBoundingClientRect().top;
Oops, yes, the absy variable isn't supposed to go there (it's used for offsets in the x/y positions in the DOM, but not when storing the data). Just updated it, should be fine now.
steps to reproduce