Search
Preparing search index...
The search index is not available
@motor/core
Options
All
Public
Public/Protected
All
Inherited
Menu
@motor/core
default
MotorCore
SVGComponent
Class SVGComponent
Hierarchy
SVGComponent
Index
Constructors
constructor
Properties
draw
item
Ary
svg
Container
Methods
add
Item
delete
Item
destroy
destroy
All
draw
Div
draw
Line
draw
Path
draw
Point
draw
Polygon
draw
Polyline
draw
Rect
draw
Text
init
line
Update
update
Position
Constructors
constructor
new SVGComponent
(
svgContainer
:
HTMLElement
, viewer
:
any
)
:
SVGComponent
Parameters
svgContainer:
HTMLElement
viewer:
any
Returns
SVGComponent
Properties
draw
draw
:
Svg
item
Ary
item
Ary
:
ItemDataSchema
[]
svg
Container
svg
Container
:
HTMLElement
Methods
add
Item
add
Item
(
item
:
ItemDataSchema
)
:
void
Parameters
item:
ItemDataSchema
Returns
void
delete
Item
delete
Item
(
item
:
SVGItemType
)
:
void
Parameters
item:
SVGItemType
Returns
void
destroy
destroy
(
)
:
void
Returns
void
destroy
All
destroy
All
(
)
:
void
Returns
void
draw
Div
draw
Div
(
worldPosition
:
any
, divDom
:
HTMLElement
)
:
HTMLElement
Parameters
worldPosition:
any
divDom:
HTMLElement
Returns
HTMLElement
draw
Line
draw
Line
(
worldPositionAry
:
[
any
,
any
]
, width
?:
number
, color
?:
string
, dasharray
?:
string
)
:
Line
Parameters
worldPositionAry:
[
any
,
any
]
Optional
width:
number
Optional
color:
string
Optional
dasharray:
string
Returns
Line
draw
Path
draw
Path
(
worldPositionAry
:
any
[]
, pathStr
?:
string
, width
?:
number
, lineColor
?:
string
, dasharray
?:
string
, fillColor
?:
string
)
:
Path
Parameters
worldPositionAry:
any
[]
Optional
pathStr:
string
Optional
width:
number
Optional
lineColor:
string
Optional
dasharray:
string
Optional
fillColor:
string
Returns
Path
draw
Point
draw
Point
(
worldPosition
:
any
, width
?:
number
, color
?:
string
)
:
Circle
Parameters
worldPosition:
any
Optional
width:
number
Optional
color:
string
Returns
Circle
draw
Polygon
draw
Polygon
(
worldPositionAry
:
any
[]
, width
?:
number
, color
?:
string
, dasharray
?:
string
)
:
Polygon
Parameters
worldPositionAry:
any
[]
Optional
width:
number
Optional
color:
string
Optional
dasharray:
string
Returns
Polygon
draw
Polyline
draw
Polyline
(
worldPositionAry
:
any
[]
, width
?:
number
, color
?:
string
, dasharray
?:
string
)
:
Polyline
Parameters
worldPositionAry:
any
[]
Optional
width:
number
Optional
color:
string
Optional
dasharray:
string
Returns
Polyline
draw
Rect
draw
Rect
(
opt
:
{
bgColor
?:
string
;
borderColor
?:
string
;
height
?:
number
;
width
?:
number
;
worldPosition
:
any
}
)
:
Rect
Parameters
opt:
{
bgColor
?:
string
;
borderColor
?:
string
;
height
?:
number
;
width
?:
number
;
worldPosition
:
any
}
Optional
bg
Color
?:
string
Optional
border
Color
?:
string
Optional
height
?:
number
Optional
width
?:
number
world
Position
:
any
Returns
Rect
draw
Text
draw
Text
(
worldPosition
:
any
, content
:
string
, txtColor
?:
string
)
:
Text
Parameters
worldPosition:
any
content:
string
Optional
txtColor:
string
Returns
Text
init
init
(
)
:
void
Returns
void
line
Update
line
Update
(
worldPositionAry
:
[
any
,
any
]
, line
:
Line
)
:
void
Parameters
worldPositionAry:
[
any
,
any
]
line:
Line
Returns
void
update
Position
update
Position
(
)
:
void
Returns
void
Exports
default
default.
Motor
Core
SVGComponent
constructor
draw
item
Ary
svg
Container
add
Item
delete
Item
destroy
destroy
All
draw
Div
draw
Line
draw
Path
draw
Point
draw
Polygon
draw
Polyline
draw
Rect
draw
Text
init
line
Update
update
Position