Hiyve Components - v1.0.0
Preparing search index...
@hiyve/react-whiteboard
createShape
Function createShape
createShape
(
type
:
"circle"
|
"rect"
|
"triangle"
|
"text"
,
options
:
{
customProps
?:
WhiteboardObjectCustomProps
;
fill
?:
string
;
height
?:
number
;
id
?:
string
;
left
:
number
;
radius
?:
number
;
stroke
?:
string
;
strokeWidth
?:
number
;
text
?:
string
;
top
:
number
;
width
?:
number
;
}
,
)
:
|
FabricObject
<
Partial
<
FabricObjectProps
>
,
SerializedObjectProps
,
ObjectEvents
,
>
|
null
Create a shape object
Parameters
type
:
"circle"
|
"rect"
|
"triangle"
|
"text"
Shape type
options
:
{
customProps
?:
WhiteboardObjectCustomProps
;
fill
?:
string
;
height
?:
number
;
id
?:
string
;
left
:
number
;
radius
?:
number
;
stroke
?:
string
;
strokeWidth
?:
number
;
text
?:
string
;
top
:
number
;
width
?:
number
;
}
Shape options
Returns
|
FabricObject
<
Partial
<
FabricObjectProps
>
,
SerializedObjectProps
,
ObjectEvents
,
>
|
null
Created Fabric.js object
Settings
Member Visibility
Inherited
External
Theme
OS
Light
Dark
Hiyve Components - v1.0.0
Loading...
Create a shape object