Files
iD/js/id/svg/surface.js
T
2013-01-11 16:01:39 -08:00

20 lines
589 B
JavaScript

iD.svg.Surface = function() {
return function(selection) {
selection.append('defs')
.append('clipPath')
.attr('id', 'clip')
.append('rect')
.attr('id', 'clip-rect')
.attr({ x: 0, y: 0 });
var clip = selection.append('g')
.attr('clip-path', 'url(#clip)');
var layers = clip.selectAll('.layer')
.data(['fill', 'casing', 'stroke', 'text', 'hit']);
layers.enter().append('g')
.attr('class', function(d) { return 'layer layer-' + d; });
};
};