Skip to content
Advertisement

Scroll bars not working correctly with canvas

The scroll bars move the canvas but they always snap back to the top or the left. What am I doing wrong?

JavaScript

Advertisement

Answer

Scrollbars require two-way communication with the widgets they are controlling. You’ve properly configured the scrollbars but haven’t configured the canvas to update the scrollbars.

To do that, add the following code after you’ve defined the canvas and scrollbars:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement