import * as go from '../../../../libs/gojs/release/go'; export declare class GuidedDraggingTool extends go.DraggingTool { private guidelineHtop; private guidelineHbottom; private guidelineHcenter; private guidelineVleft; private guidelineVright; private guidelineVcenter; /** * @constructor * @extends DraggingTool * @class * This draggingTool class makes guidelines visible as the parts are dragged around a diagram * when the selected part is nearly aligned with another part. */ constructor(); /** * Removes all of the guidelines from the grid. * @this {GuidedDraggingTool} */ clearGuidelines(): void; /** * Calls the base method from {@link DraggingTool#doDeactivate} * and removes the guidelines from the graph. * @this {GuidedDraggingTool} */ doDeactivate(): void; doDragOver(pt: any, obj: any): void; /** * On a mouse-up, snaps the selected part to the nearest guideline. * If no guidelines are showing, the part remains at its position. * This calls {@link #guidelineSnap}. * @this {GuidedDraggingTool} */ doDropOnto(pt: any, obj: any): void; /** * When nodes are shifted due to being guided upon a drop, make sure all connected link routes are invalidated, * since the node is likely to have moved a different amount than all its connected links in the regular * operation of the DraggingTool. * @this {GuidedDraggingTool} */ invalidateLinks(node: any): void; /** * This finds parts that are aligned near the selected part along horizontal lines. It compares the selected * part to all parts within a rectangle approximately twice the {@link #searchDistance} wide. * The guidelines appear when a part is aligned within a margin-of-error equal to {@link #guidelineSnapDistance}. * The parameters used for {@link #guidelineSnap} are also set here. * @this {GuidedDraggingTool} * @param {Part} part * @param {boolean} guideline if true, show guideline * @param {boolean} snap if true, snap the part to where the guideline would be */ showHorizontalMatches(part: any, guideline: any, snap: any): void; /** * This finds parts that are aligned near the selected part along vertical lines. It compares the selected * part to all parts within a rectangle approximately twice the {@link #searchDistance} tall. * The guidelines appear when a part is aligned within a margin-of-error equal to {@link #guidelineSnapDistance}. * The parameters used for {@link #guidelineSnap} are also set here. * @this {GuidedDraggingTool} * @param {Part} part * @param {boolean} guideline if true, show guideline * @param {boolean} snap if true, don't show guidelines but just snap the part to where the guideline would be */ showVerticalMatches(part: any, guideline: any, snap: any): void; /** * Gets or sets the margin of error for which guidelines show up. * The default value is 6. * Guidelines will show up when the aligned nods are 卤 6px away from perfect alignment. * @name GuidedDraggingTool#guidelineSnapDistance * @function. * @return {number} */ private _guidelineSnapDistance; guidelineSnapDistance: number; /** * Gets or sets whether the guidelines are enabled or disable. * The default value is true. * @name GuidedDraggingTool#isGuidelineEnabled * @function. * @return {boolean} */ private _isGuidelineEnabled; isGuidelineEnabled: boolean; /** * Gets or sets the color of horizontal guidelines. * The default value is "gray". * @name GuidedDraggingTool#horizontalGuidelineColor * @function. * @return {string} */ private _horizontalGuidelineColor; horizontalGuidelineColor: string; /** * Gets or sets the color of vertical guidelines. * The default value is "gray". * @name GuidedDraggingTool#verticalGuidelineColor * @function. * @return {string} */ private _verticalGuidelineColor; verticalGuidelineColor: string; /** * Gets or sets the color of center guidelines. * The default value is "gray". * @name GuidedDraggingTool#centerGuidelineColor * @function. * @return {string} */ private _centerGuidelineColor; centerGuidelineColor: string; /** * Gets or sets the width guidelines. * The default value is 1. * @name GuidedDraggingTool#guidelineWidth * @function. * @return {number} */ private _guidelineWidth; guidelineWidth: number; /** * Gets or sets the distance around the selected part to search for aligned parts. * The default value is 1000. * Set this to Infinity if you want to search the entire diagram no matter how far away. * @name GuidedDraggingTool#searchDistance * @function. * @return {number} */ private _searchDistance; searchDistance: number; /** * Gets or sets whether snapping to guidelines is enabled. * The default value is true. * @name GuidedDraggingTool#isGuidelineSnapEnabled * @function. * @return {Boolean} */ private _isGuidelineSnapEnabled; isGuidelineSnapEnabled: boolean; }