DEV Community

AndyBullet
AndyBullet

Posted on

2

I need help for a changement

Hi guys! I would like to have an information.
https://pastebin.com/68recZYa
In this code, when I click "Move" button, the image in "myDIV" div go ahead, and the viewport follow him. But I would like that this method would work in a canvas instead of a div. Can you tell me a how can I do it?

Top comments (3)

Collapse
 
ibrahimfromtgddev profile image
Ibrahim Imran

Try duplicating the code incase anything gets damaged then try doing canvas instead of div.

Collapse
 
andybullet profile image
AndyBullet • Edited

I already tryed it. The scrollbar is absent if I replace div with canvas.

Collapse
 
ibrahimfromtgddev profile image
Ibrahim Imran

Too bad.... Try switching code systems see what happens?

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay