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.

  1. both canvas got pushed down..
  2. displays both canvas
  3. 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.

http://jsfiddle.net/loktar/r3hyg/


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -