Переделано построение всех карт

This commit is contained in:
djerom
2022-04-12 18:01:01 +05:00
parent 3fd00f9e3f
commit 9e13e9ec1a
11 changed files with 480 additions and 426 deletions

View File

@@ -1,21 +1,31 @@
export default {
wellhead: {
prod(x, y, r, style){
return SvgNodes.circle(r).add_style(style).move(w.x, w.y);
},
inj(x, y, r, style){
return SvgNodes.circle(r).add_style(style).move(w.x, w.y);
}
},
// [{x,y}]
heads(wells, r, style) {
return wells.map((w) => SvgNodes.circle(r).set_style(style).move(w.x, w.y));
return wells.map((w) => SvgNodes.circle(r).add_style(style).move(w.x, w.y));
},
// [{x,y,name}]
names(wells, style, shift) {
return wells.map((w) =>
SvgNodes.text(w.name)
.set_style(style)
.add_style(style)
.move(w.x + shift.x, w.y + shift.y)
);
},
// {x,y,ring[1,2,3,4,5]}
ring(x, y, r0, r1, a0, a1, style) {
return SvgNodes.ring_sector(r0, r1, a0, a1).move(x, y).set_style(style);
return SvgNodes.ring_sector(r0, r1, a0, a1).move(x, y).add_style(style);
},
};