Open kapv89 opened 1 year ago
You'd have to first detect whether the mouse pointer is above an object, then move the camera to that object's position using the moveTo
function and then zoom in/out
See erdtool.com (currently on pause) .. uses code in this lib
Hi, so I am using code from this in a project with an infinite canvas with multiple objects. The behaviour I'd like is that when zooming starts and the mouse pointer is over a certain object, that object moves to the center of the viewport as zoom progresses. Any idea how to achieve this?