#1295 Styling of start/end nodes, arrows and regular states

This commit is contained in:
Knut Sveidqvist
2020-03-28 13:59:41 +01:00
parent 391dc06013
commit 85f47e1693
8 changed files with 205 additions and 82 deletions

View File

@@ -375,6 +375,34 @@ const start = (parent, node) => {
return shapeSvg;
};
const end = (parent, node) => {
const shapeSvg = parent
.insert('g')
.attr('class', 'node default')
.attr('id', node.id);
const innerCircle = shapeSvg.insert('circle', ':first-child');
const circle = shapeSvg.insert('circle', ':first-child');
circle
.attr('class', 'state-start')
.attr('r', 7)
.attr('width', 14)
.attr('height', 14);
innerCircle
.attr('class', 'state-end')
.attr('r', 5)
.attr('width', 10)
.attr('height', 10);
updateNodeBounds(node, circle);
node.intersect = function(point) {
return intersect.circle(node, point);
};
return shapeSvg;
};
const shapes = {
question,
@@ -390,7 +418,7 @@ const shapes = {
rect_right_inv_arrow,
cylinder,
start,
end: start
end
};
let nodeElems = {};