fabric-v6-guideline
Version:
- Help you easily append guidelines to your canvas for the selected objects. It help you easily aligning to your object with the others. And Auto snap when the object moved to the center line of the canvas
27 lines (26 loc) • 693 B
TypeScript
import { Canvas } from 'fabric';
type strokeOptionProps = Partial<{
lineColor: string;
lineWidth: number;
canvasCenterLine: boolean;
opacity: number;
strokeDashArray: number[];
threshold: number;
autoSnap: boolean;
autoSnapThreshold: number;
snapLineColor: string;
}>;
export declare class GuideLine {
private canvas;
private strokeOption?;
constructor(canvas: Canvas, strokeOption?: strokeOptionProps);
init(): void;
private handleAroundObjectLine;
private handleObjectMoving;
private createVerticalLine;
private snap;
private createHorizontalLine;
private createAroundLine;
private clearGuideLine;
}
export {};