Paper.js after using setZoom () image is out of bounds, how to bind the zoom to the left upper coordinate, so that the image is zoomed from it?

view.setZoom ();

Expected Result: Expected Result

Moving image after zoom: Moving image after zoom

    1 answer 1

    I found that I need to create my zoom method with starting coordinates

    setZoomToTopLeft: function (zoom) { this.transform(new Matrix().scale(zoom / this.getZoom(), new Point(0, 0))); },