gniziemazity / advanced_drawing_app

Making an advanced drawing app during my live streams:
MIT License
28 stars 24 forks source link

refactor(HTML): function to create dom elements #4

Closed Pesterenan closed 3 months ago

Pesterenan commented 4 months ago

Hi Radu! I've created a general function to create the base for new dom elements in classes, but it turned out to more code in the end unfortunately haha

The main changes are a 'createDOMElement' function, and a specific implementation of that, for your inputs, which I used in the PropertiesPanel class. I also documented what the functions expects and returns using JSDoc, and it would be a great addition to your project to use it in other functions on your code, as it helps with documentation.

You don't have to merge this if you don't want, and you can use part of the code if you want also! Keep up the awesome work you're doing!

Best regards, -Renan