dist/modules/base/AnnotationTool.js
/**
     * Limit a point to workspace artboard
     * @param point point to limit to workspace
     */
Limit a point to workspace artboard
@param point point to limit to workspace
Limit a point to workspace artboard @param point point to limit to workspace
limitToArtboard(point) {
        const limited = new paper_1.Point(point);
        const artboard = this.workspace.artboard;
        if (artboard) {
            if (point.x > artboard.right)
                limited.x = artboard.right;
            else if (point.x < artboard.left)
                limited.x = artboard.left;
            if (point.y > artboard.bottom)
                limited.y = artboard.bottom;
            else if (point.y < artboard.top)
                limited.y = artboard.top;
        }
        return limited;
    }
limitToArtboard ( point ) { const limited = new paper_1 . Point ( point ) ; const artboard = this . workspace . artboard ; if ( artboard ) { if ( point . x > artboard . right ) limited . x = artboard . right ; else if ( point . x < artboard . left ) limited . x = artboard . left ; if ( point . y > artboard . bottom ) limited . y = artboard . bottom ; else if ( point . y < artboard . top ) limited . y = artboard . top ; } return limited ; }
Limit a point to workspace artboard
 @param point point to limit to workspace
Limit a point to workspace artboard @param point point to limit to workspace
// limit the x  // limit the y