javascript - How to have 2 or more canvas in the same page.. not as layers -
i have page i've 2 canvas. 1 tracking mouse position , simple drawing. both code working not expected.
- both canvas got pushed down..
- displays both canvas
- uses 1 of canvas display results
. why?? here link page canvas, expected output
you appending both canvas elements each time. heres area of code it, , quick check put in place.
if(flag ===1){ canvasdiv1.appendchild(canvas); }else{ canvasdiv2.appendchild(canvas); }
here link full code, , assume going for.
Comments
Post a Comment