1 версия карт тек.нак отборов и закачки

This commit is contained in:
djerom
2022-03-30 17:25:20 +05:00
parent 6ea104aa08
commit 9a169e5872
12 changed files with 987 additions and 200 deletions

View File

@@ -26,6 +26,10 @@ export default {
})
},
container(items){
return new SvgNode(null, null, items)
},
group(items){
return new SvgNode("g", null, items)
},
@@ -86,6 +90,26 @@ export default {
node.items = [text];
node.set_attrs({x: 0, y: 0})
return node;
},
defs: {
simple: {
radialGradient(id, color0, color1){
let s0 = new SvgNode("stop", {offset: "0%", "stop-color": color0})
let s1 = new SvgNode("stop", {offset: "100%", "stop-color": color1})
return new SvgNode("radialGradient", {id}).append(s0, s1)
}
},
radialGradient(id, cx, cy, r){
return new SvgNode("radialGradient", {id, cx, cy, r})
},
stop(offset, color){
return new SvgNode("stop", {offset, "stop-color": color})
},
}
};