🌍 Public
Viewing a saved revision (read-only)
48ec83f66a3f4fe99af9ed489486fc00
Pan
This example demonstrates a basic panning interaction within a bounded viewport. A draggable map area, containing an SVG red circle, can be moved by clicking and dragging with the mouse. The implementation uses plain JavaScript event handlers, specifically `onmousedown`, `onmousemove`, and `onmouseup`, to track cursor movement and update the map's absolute `left` and `top` CSS properties. The map's movement is constrained to a 400-pixel range in both axes, and it uses a Google logo image as its background.
AI-generated descriptionA bare minimum HTML page.