svg-select
v0.0.0
Published
select geometries from svg files by clicking
Downloads
7
Readme
svg-select
select geometries from svg files by clicking
example
var select = require('svg-select');
var s = select(document.querySelector('svg'));
s.on('select', function (geom) {
geom.style.stroke = 'red';
});
s.on('blur', function (geom) {
geom.style.stroke = 'black';
});
methods
var select = require('svg-select')
s = select(svg)
Create a new select instance s
given an svg
element.
s.blur()
Deselect the active
events
s.on('select', geom, ev)
Fires when a geometry is selected.
s.on('blur', geom, ev)
Fires when a geometry is deselected.
install
With npm do:
npm install svg-select
license
MIT