Files
iD/js/id/svg/surface.js
T
2013-01-16 13:54:36 -05:00

20 lines
601 B
JavaScript

iD.svg.Surface = function() {
return function drawSurface(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; });
};
};