Skip to content

Commit 6abbdec

Browse files
Added comments and copyright notice
1 parent 8a0b1d6 commit 6abbdec

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/components/cylc/GraphSubgraph.vue

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
<!--
2+
Copyright (C) NIWA & British Crown (Met Office) & Contributors.
3+
4+
This program is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
-->
17+
18+
<!--
19+
Subgraph - Used to render graphviz subgraphs as svg.
20+
-->
121
<template>
222
<g class="c-graph-subgraph">
323
<rect
@@ -42,6 +62,9 @@ export default {
4262
return (parseInt(this.subgraph.x) + (parseInt(this.subgraph.width) / 2))
4363
},
4464
labelYPosition () {
65+
// Graphviz puts labels inside the subgraph
66+
// SVG rect text is put outside the rect
67+
// Adding 90pt to the y position brings the label inside the rect
4568
return (parseInt(this.subgraph.y) + 90)
4669
},
4770
}

0 commit comments

Comments
 (0)