svg.select.js - Demo
Rectangle, normal selection
new SVG('rect').size('100%', '100%')
.rect(600,200).move(50,50).selectize();
Polygon, deep selection
new SVG('polygon_deep').size('100%', '100%')
.polygon('350,50 283,250 450,122 250,122 416,250')
.selectize({deepSelect:true});
Polygon, both
new SVG('polygon_both').size('100%', '100%')
.polygon('350,50 283,250 450,122 250,122 416,250')
.selectize().selectize({deepSelect:true});
Polygon, selection on click
var poly = new SVG('polygon_click').size('100%', '100%')
.polygon('350,50 283,250 450,122 250,122 416,250')
.attr('pointer-events',"visible");
poly.on('mousedown', function(e){
poly.selectize().selectize({deepSelect:true});
}, false);