Make vertical spacing more consistent
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.6 KiB |
|
@ -29,6 +29,7 @@ define(['./BaseComponent'], (BaseComponent) => {
|
||||||
env.drawAgentLine(name, env.primaryY);
|
env.drawAgentLine(name, env.primaryY);
|
||||||
env.agentInfos.get(name).currentRad = r;
|
env.agentInfos.get(name).currentRad = r;
|
||||||
});
|
});
|
||||||
|
return env.primaryY + env.theme.actionMargin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -300,7 +300,10 @@ define([
|
||||||
'fill': 'transparent',
|
'fill': 'transparent',
|
||||||
}), clickable.firstChild);
|
}), clickable.firstChild);
|
||||||
|
|
||||||
return y1 + arrowDip + env.theme.actionMargin;
|
return y1 + Math.max(
|
||||||
|
arrowDip + env.theme.minActionMargin,
|
||||||
|
env.theme.actionMargin
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderSimpleConnect({label, agentNames, options}, env) {
|
renderSimpleConnect({label, agentNames, options}, env) {
|
||||||
|
@ -359,7 +362,10 @@ define([
|
||||||
'fill': 'transparent',
|
'fill': 'transparent',
|
||||||
}), clickable.firstChild);
|
}), clickable.firstChild);
|
||||||
|
|
||||||
return y + arrowSpread + env.theme.actionMargin;
|
return y + Math.max(
|
||||||
|
arrowSpread + env.theme.minActionMargin,
|
||||||
|
env.theme.actionMargin
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderPre({label, agentNames, options}, env) {
|
renderPre({label, agentNames, options}, env) {
|
||||||
|
|
|
@ -93,12 +93,12 @@ defineDescribe('Sequence Integration', [
|
||||||
|
|
||||||
const content = getSimplifiedContent(renderer);
|
const content = getSimplifiedContent(renderer);
|
||||||
expect(content).toContain(
|
expect(content).toContain(
|
||||||
'<svg viewBox="-5 -5 82 47">'
|
'<svg viewBox="-5 -5 82 56">'
|
||||||
);
|
);
|
||||||
|
|
||||||
// Agent 1
|
// Agent 1
|
||||||
expect(content).toContain(
|
expect(content).toContain(
|
||||||
'<line x1="20.5" y1="11" x2="20.5" y2="37" class="agent-1-line"'
|
'<line x1="20.5" y1="11" x2="20.5" y2="46" class="agent-1-line"'
|
||||||
);
|
);
|
||||||
expect(content).toContain(
|
expect(content).toContain(
|
||||||
'<rect x="10" y="0" width="21" height="11"'
|
'<rect x="10" y="0" width="21" height="11"'
|
||||||
|
@ -109,7 +109,7 @@ defineDescribe('Sequence Integration', [
|
||||||
|
|
||||||
// Agent 2
|
// Agent 2
|
||||||
expect(content).toContain(
|
expect(content).toContain(
|
||||||
'<line x1="51.5" y1="11" x2="51.5" y2="37" class="agent-2-line"'
|
'<line x1="51.5" y1="11" x2="51.5" y2="46" class="agent-2-line"'
|
||||||
);
|
);
|
||||||
expect(content).toContain(
|
expect(content).toContain(
|
||||||
'<rect x="41" y="0" width="21" height="11"'
|
'<rect x="41" y="0" width="21" height="11"'
|
||||||
|
@ -120,10 +120,10 @@ defineDescribe('Sequence Integration', [
|
||||||
|
|
||||||
// Arrow
|
// Arrow
|
||||||
expect(content).toContain(
|
expect(content).toContain(
|
||||||
'<line x1="20.5" y1="19" x2="48.5" y2="19"'
|
'<line x1="20.5" y1="26" x2="48.5" y2="26"'
|
||||||
);
|
);
|
||||||
expect(content).toContain(
|
expect(content).toContain(
|
||||||
'<polygon points="46 14 51 19 46 24"'
|
'<polygon points="46 21 51 26 46 31"'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,8 @@ define(['core/ArrayUtilities', 'svg/SVGShapes'], (array, SVGShapes) => {
|
||||||
titleMargin: 10,
|
titleMargin: 10,
|
||||||
outerMargin: 5,
|
outerMargin: 5,
|
||||||
agentMargin: 10,
|
agentMargin: 10,
|
||||||
actionMargin: 3,
|
actionMargin: 10,
|
||||||
|
minActionMargin: 3,
|
||||||
agentLineHighlightRadius: 4,
|
agentLineHighlightRadius: 4,
|
||||||
|
|
||||||
agentCap: {
|
agentCap: {
|
||||||
|
|
|
@ -8,6 +8,7 @@ define(['core/ArrayUtilities', 'svg/SVGShapes'], (array, SVGShapes) => {
|
||||||
outerMargin: 5,
|
outerMargin: 5,
|
||||||
agentMargin: 8,
|
agentMargin: 8,
|
||||||
actionMargin: 5,
|
actionMargin: 5,
|
||||||
|
minActionMargin: 5,
|
||||||
agentLineHighlightRadius: 4,
|
agentLineHighlightRadius: 4,
|
||||||
|
|
||||||
agentCap: {
|
agentCap: {
|
||||||
|
|