Can anybody help me in code to move an image on canvas using arrow keys in JavaScript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can anybody help me in code to move an image on canvas using arrow keys in JavaScript?

Move image on canvas

8th Mar 2018, 10:01 PM
Manpreet Singh
Manpreet Singh - avatar
5 Answers
+ 1
ya I know these concepts
9th Mar 2018, 5:48 AM
Manpreet Singh
Manpreet Singh - avatar
+ 1
it is ok in left and top condition but going out of canvas in right and bottom sides.
9th Mar 2018, 6:01 AM
Manpreet Singh
Manpreet Singh - avatar
+ 1
what is x and y
9th Mar 2018, 6:07 AM
Manpreet Singh
Manpreet Singh - avatar
0
No I want to draw an image on canvas then move it whenever any arrow key is pressed
9th Mar 2018, 4:59 AM
Manpreet Singh
Manpreet Singh - avatar
0
also image is started to move but it goes out of canvas enen I applied if condition
9th Mar 2018, 5:49 AM
Manpreet Singh
Manpreet Singh - avatar