Search
Preparing search index...
The search index is not available
protractr
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
"ui/sketchview"
SketchView
Class SketchView
Hierarchy
SketchView
Index
Constructors
constructor
Properties
canvas
ctx
ctx
Origin
ctx
Scale
hovered
Figure
last
Pan
Point
ui
Methods
draw
draw
Circle
draw
Figure
draw
Line
draw
Point
handle
Mouse
Event
handle
Pan
Event
handle
Tool
Event
handle
Zoom
Event
push
State
set
Cursor
snap
Point
update
Hover
Constructors
constructor
new
Sketch
View
(
ui
:
UI
, canvas
:
HTMLCanvasElement
)
:
SketchView
Parameters
ui:
UI
canvas:
HTMLCanvasElement
Returns
SketchView
Properties
canvas
canvas
:
HTMLCanvasElement
ctx
ctx
:
CanvasRenderingContext2D
ctx
Origin
ctx
Origin
:
Point
ctx
Scale
ctx
Scale
:
number
hovered
Figure
hovered
Figure
:
Figure
last
Pan
Point
last
Pan
Point
:
Point
= null
ui
ui
:
UI
Methods
draw
draw
(
)
:
void
Returns
void
draw
Circle
draw
Circle
(
center
:
Point
, radius
:
number
)
:
void
Parameters
center:
Point
radius:
number
Returns
void
draw
Figure
draw
Figure
(
fig
:
Figure
)
:
void
Parameters
fig:
Figure
Returns
void
draw
Line
draw
Line
(
p1
:
Point
, p2
:
Point
)
:
void
Parameters
p1:
Point
p2:
Point
Returns
void
draw
Point
draw
Point
(
point
:
Point
, size
?:
number
, color
?:
string
)
:
void
Parameters
point:
Point
Default value
size:
number
= 3
Default value
color:
string
= "black"
Returns
void
handle
Mouse
Event
handle
Mouse
Event
(
event
:
MouseEvent
&
WheelEvent
)
:
void
Parameters
event:
MouseEvent
&
WheelEvent
Returns
void
handle
Pan
Event
handle
Pan
Event
(
type
:
string
, offset
:
Point
)
:
void
Parameters
type:
string
offset:
Point
Returns
void
handle
Tool
Event
handle
Tool
Event
(
type
:
string
, point
:
Point
, snapFigure
:
Figure
)
:
void
Parameters
type:
string
point:
Point
snapFigure:
Figure
Returns
void
handle
Zoom
Event
handle
Zoom
Event
(
deltaY
:
number
, point
:
Point
)
:
void
Parameters
deltaY:
number
point:
Point
Returns
void
push
State
push
State
(
)
:
void
Returns
void
set
Cursor
set
Cursor
(
cursor
:
string
)
:
void
Parameters
cursor:
string
Returns
void
snap
Point
snap
Point
(
point
:
Point
)
:
Point
Parameters
point:
Point
Returns
Point
update
Hover
update
Hover
(
point
:
Point
)
:
void
Parameters
point:
Point
Returns
void
Globals
"gcs/constraint"
"gcs/constraint_
filter"
"gcs/figures"
"gcs/sketch"
"main"
"protractr"
"ui/history"
"ui/sidepane"
"ui/sketchview"
"ui/toolbar"
"ui/tools"
"ui/ui"
Sketch
View
constructor
canvas
ctx
ctx
Origin
ctx
Scale
hovered
Figure
last
Pan
Point
ui
draw
draw
Circle
draw
Figure
draw
Line
draw
Point
handle
Mouse
Event
handle
Pan
Event
handle
Tool
Event
handle
Zoom
Event
push
State
set
Cursor
snap
Point
update
Hover
Generated using
TypeDoc