Accessors
model
- get model(): OIModel
otherSnapPoints
- get otherSnapPoints(): TPoint[]
renderer
- get renderer(): OISVGRenderer
selectionSnapPoints
- get selectionSnapPoints(): TPoint[]
snapThreshold
- get snapThreshold(): number
Returns number
Constructors
constructor
- new OISnapManager(behaviors, options?): OISnapManager
Parameters
Optional
options: {
angle?: number;
element?: boolean;
grid?: boolean;
}
Optional
angle?: number
Optional
element?: boolean
Optional
grid?: boolean
Methods
clearSnapToElementLines
- clearSnapToElementLines(): void
Returns void
drawSnapToElementLines
- drawSnapToElementLines(lines): void
Returns void
Protected
getGuidePointToSnap
- getGuidePointToSnap(point): TPoint
Protected
getNearestHorizontalGuide
- getNearestHorizontalGuide(y): number
Returns number
Protected
getNearestVerticalGuide
- getNearestVerticalGuide(x): number
Returns number
Protected
getSnapLinesInfos
- getSnapLinesInfos(sourcePoints, targetPoints): TSnapLineInfos
snapResize
- snapResize(point, horizontal?, vertical?): TPoint
Parameters
horizontal: boolean = true
vertical: boolean = true
snapRotation
- snapRotation(angleDegree): number
Returns number
snapTranslate
- snapTranslate(tx, ty): TPoint
Properties
Private
#logger
behaviors
snapAngle
snapAngle: number
snapToElement
snapToElement: boolean
snapToGrid
snapToGrid: boolean