svg-select

select geometries from svg files by clicking

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')

Create a new select instance s given an svg element.

Deselect the active

events

Fires when a geometry is selected.

Fires when a geometry is deselected.

install

With npm do:

npm install svg-select

license

MIT