1.0.15 • Published 8 years ago
svg-sketch-controls v1.0.15
svg-sketch-controls
controls used together with svg-sketch
Use with browserify
methods
optional methods implemented by each control
var control = Control(el);
el is the svg parent element
control.matchEvent(event)
does event match current control?
useful if UI is to show current control (pencil, rectangle etc)
control.down(xy)
Called with xy
control.up(xy)
Called with xy
control.pathSelected(opt)
opt.e dom event opt.path svg path in json eventstream
events
createEvent(event)
event contains
{
type: 'type',
args: {
'svg args + metadata'
},
origin: xy
}
updateEvent(event)
same structure as for createEvent
deleteEvent(event)
delete event
closeToPath(target)
close to svg path useful with touch devices
when touching the exact point on the svg path may be hard
install
With npm do:
npm install svg-sketch-controls
license
MIT
1.0.15
8 years ago
1.0.14
8 years ago
1.0.13
8 years ago
1.0.12
9 years ago
1.0.11
9 years ago
1.0.10
9 years ago
1.0.9
9 years ago
1.0.8
9 years ago
1.0.7
9 years ago
1.0.6
9 years ago
1.0.5
9 years ago
1.0.4
9 years ago
1.0.3
9 years ago
1.0.2
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago
0.0.4
10 years ago
0.0.3
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago
0.0.0
10 years ago