Eulergraph
Preparing search index...
services/SnapService/SnapService
SnapService
Class SnapService
Hierarchy (
View Summary
)
Service
SnapService
Index
Constructors
constructor
Properties
euler
Engine
interactive
settings
Accessors
snap
Point
snap
Radius
Methods
disable
Interactive
dispose
draw
Closest
Magnet
Point
draw
Magnet
Points
draw
Snap
Helper
draw
Snap
Radius
find
Border
Alignment
find
Closest
Magnet
Point
get
Close
Shapes
get
Drag
Snap
get
Grid
Snapped
Point
get
Snap
Point
make
Interactive
move
To
Magnet
Point
update
Settings
Constructors
constructor
new
SnapService
(
eulerEngine
:
EulerGraph
)
:
SnapService
Parameters
eulerEngine
:
EulerGraph
Returns
SnapService
Properties
Readonly
euler
Engine
eulerEngine
:
EulerGraph
interactive
interactive
:
boolean
= true
settings
settings
:
SnapServiceSettings
= ...
Accessors
snap
Point
get
snapPoint
()
:
SnapPoint
|
undefined
Returns
SnapPoint
|
undefined
snap
Radius
get
snapRadius
()
:
number
Returns
number
Methods
disable
Interactive
disableInteractive
()
:
void
Returns
void
dispose
dispose
()
:
void
Returns
void
draw
Closest
Magnet
Point
drawClosestMagnetPoint
(
draggingCell
:
GraphicElement
)
:
void
Parameters
draggingCell
:
GraphicElement
Returns
void
draw
Magnet
Points
drawMagnetPoints
(
draggingCell
:
GraphicElement
)
:
void
Parameters
draggingCell
:
GraphicElement
Returns
void
draw
Snap
Helper
drawSnapHelper
(
ctx
:
CanvasRenderingContext2D
,
point
:
PointLike
,
cell
?:
GraphicElement
,
)
:
void
Parameters
ctx
:
CanvasRenderingContext2D
point
:
PointLike
Optional
cell
:
GraphicElement
Returns
void
draw
Snap
Radius
drawSnapRadius
(
ctx
:
CanvasRenderingContext2D
,
point
:
PointLike
)
:
void
Parameters
ctx
:
CanvasRenderingContext2D
point
:
PointLike
Returns
void
find
Border
Alignment
findBorderAlignment
(
cells
:
GraphicElement
[]
,
bbox
?:
Rect
,
)
:
|
{
closest
:
Cell
|
null
;
direction
:
"vertical"
|
"horizontal"
;
fromPoint
:
PointLike
;
offset
?:
PointLike
;
snapPoint
?:
PointLike
;
toPoint
:
PointLike
;
}
|
null
Parameters
cells
:
GraphicElement
[]
Optional
bbox
:
Rect
Returns
|
{
closest
:
Cell
|
null
;
direction
:
"vertical"
|
"horizontal"
;
fromPoint
:
PointLike
;
offset
?:
PointLike
;
snapPoint
?:
PointLike
;
toPoint
:
PointLike
;
}
|
null
find
Closest
Magnet
Point
findClosestMagnetPoint
(
shape
:
GraphicElement
,
)
:
{
cell
:
GraphicElement
|
null
;
dist
:
number
;
magnetFrom
:
Point
|
null
;
magnetTarget
:
Point
|
null
;
}
Parameters
shape
:
GraphicElement
Returns
{
cell
:
GraphicElement
|
null
;
dist
:
number
;
magnetFrom
:
Point
|
null
;
magnetTarget
:
Point
|
null
;
}
get
Close
Shapes
getCloseShapes
(
boundingSphere
:
{
center
:
Point
;
radius
:
number
}
,
)
:
GraphicElement
[]
Parameters
boundingSphere
:
{
center
:
Point
;
radius
:
number
}
Returns
GraphicElement
[]
get
Drag
Snap
getDragSnap
(
cells
:
GraphicElement
[]
,
)
:
{
offsetX
:
number
;
offsetY
:
number
}
|
null
Parameters
cells
:
GraphicElement
[]
Returns
{
offsetX
:
number
;
offsetY
:
number
}
|
null
get
Grid
Snapped
Point
getGridSnappedPoint
(
point
?:
PointLike
)
:
Point
|
undefined
Parameters
Optional
point
:
PointLike
Returns
Point
|
undefined
get
Snap
Point
getSnapPoint
(
point
:
Point
,
additionalPoints
?:
Point
[]
,
exclude
?:
GraphicElement
|
null
,
)
:
SnapPoint
Parameters
point
:
Point
Optional
additionalPoints
:
Point
[]
Optional
exclude
:
GraphicElement
|
null
Returns
SnapPoint
make
Interactive
makeInteractive
()
:
void
Returns
void
move
To
Magnet
Point
moveToMagnetPoint
(
shape
:
GraphicElement
)
:
void
Parameters
shape
:
GraphicElement
Returns
void
update
Settings
updateSettings
(
settings
:
Partial
<
SnapServiceSettings
>
)
:
void
Parameters
settings
:
Partial
<
SnapServiceSettings
>
Returns
void
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
euler
Engine
interactive
settings
Accessors
snap
Point
snap
Radius
Methods
disable
Interactive
dispose
draw
Closest
Magnet
Point
draw
Magnet
Points
draw
Snap
Helper
draw
Snap
Radius
find
Border
Alignment
find
Closest
Magnet
Point
get
Close
Shapes
get
Drag
Snap
get
Grid
Snapped
Point
get
Snap
Point
make
Interactive
move
To
Magnet
Point
update
Settings
Eulergraph
Loading...