mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-21 19:26:41 +02:00
20 lines
601 B
JavaScript
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; });
|
|
};
|
|
};
|