I'm currently developing a control website for a drawing robot as part of a school project. However, I've been facing some challenges with the functionality of the drawing feature.
Though I admit that the site lacks attention to detail, my main focus is on getting the drawing function to work correctly.
One issue I've encountered is JavaScript not recognizing the HTML elements unless I manually call the function again using a button or an onload=""
function.
My background is primarily in JAVA, and I haven't had formal training in JavaScript, HTML, or CSS design, so I kindly ask not to be judged based on that.
Initially, I suspected that the canvasOffsetx
and y
values were not obtaining absolute positions but relative ones from the parent div, resulting in incorrect drawings. Unfortunately, I'm unsure how to resolve this without disrupting the entire CSS layout.
The area of concern lies within the "actions" div; the remaining content is unrelated to the issue at hand.
To access the full codebase, please visit the following GitHub repository: https://github.com/Masaslo/StackOverflowQuestions.git