File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
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
+ -->
1
21
<template >
2
22
<g class =" c-graph-subgraph" >
3
23
<rect
@@ -42,6 +62,9 @@ export default {
42
62
return (parseInt (this .subgraph .x ) + (parseInt (this .subgraph .width ) / 2 ))
43
63
},
44
64
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
45
68
return (parseInt (this .subgraph .y ) + 90 )
46
69
},
47
70
}
You can’t perform that action at this time.
0 commit comments