Skip to main content

Home > @jsplumbtoolkit/browser-ui > Surface > getApparentCanvasLocation

Surface.getApparentCanvasLocation() method

Returns the apparent {x,y} of the canvas inside the viewport - the coordinates, in real pixel values, of where the origin of the canvas appears to be. This apparent origin is not necessarily the same as the {x,y} values of the canvas, because the transform origin and zoom values change things. This function can be used in conjunction with the content bounds by widgets such as the miniview, to calculate what is actually visible in the viewport at some point in time.


getApparentCanvasLocation(): PointXY;



Top left location of the canvas, relative to the viewport's 0,0.