Answer the question
In order to leave comments, you need to log in
Why is it giving an error and not working to rotate the image?
I can’t understand what exactly the problem is and how to solve it, I’ve been breaking my head for 2 hours to understand what’s wrong in the code. On a separate page of the site holland-store.ru/konstruktor.html , the rotation of the image and the addition of text do not work.
If you go to the main page and go to the same constructor when you click on the dot next to the "Try for free" button, then everything works fine, except for the modal window, of course, but this is a separate issue.
Uncaught TypeError: Cannot read property 'getContext' of null
at konstruktor.js:49
Where is the solution to look for?
Answer the question
In order to leave comments, you need to log in
It looks like this block (konstruktor.js:49) is executed before the DOM is completely loaded. Move initialization to $(document).ready(...)
//Работа с текстом
var canvas = document.getElementById("textImgKonstr");
var ctx = canvas.getContext("2d");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question