| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 "use strict"; | 5 "use strict"; |
| 6 | 6 |
| 7 class GraphView extends View { | 7 class GraphView extends View { |
| 8 constructor (d3, id, nodes, edges, broker) { | 8 constructor (d3, id, nodes, edges, broker) { |
| 9 super(id, broker); | 9 super(id, broker); |
| 10 var graph = this; | 10 var graph = this; |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 .classed("label", true) | 781 .classed("label", true) |
| 782 .attr("text-anchor","right") | 782 .attr("text-anchor","right") |
| 783 .attr("dx", "5") | 783 .attr("dx", "5") |
| 784 .attr("dy", DEFAULT_NODE_HEIGHT / 2 + 5) | 784 .attr("dy", DEFAULT_NODE_HEIGHT / 2 + 5) |
| 785 .append('tspan') | 785 .append('tspan') |
| 786 .text(function(l) { | 786 .text(function(l) { |
| 787 return d.getDisplayLabel(); | 787 return d.getDisplayLabel(); |
| 788 }) | 788 }) |
| 789 .append("title") | 789 .append("title") |
| 790 .text(function(l) { | 790 .text(function(l) { |
| 791 return d.getLabel(); | 791 return d.getTitle(); |
| 792 }) | 792 }) |
| 793 if (d.type != undefined) { | 793 if (d.type != undefined) { |
| 794 d3.select(this).append("text") | 794 d3.select(this).append("text") |
| 795 .classed("label", true) | 795 .classed("label", true) |
| 796 .classed("type", true) | 796 .classed("type", true) |
| 797 .attr("text-anchor","right") | 797 .attr("text-anchor","right") |
| 798 .attr("dx", "5") | 798 .attr("dx", "5") |
| 799 .attr("dy", DEFAULT_NODE_HEIGHT / 2 + TYPE_HEIGHT + 5) | 799 .attr("dy", DEFAULT_NODE_HEIGHT / 2 + TYPE_HEIGHT + 5) |
| 800 .append('tspan') | 800 .append('tspan') |
| 801 .text(function(l) { | 801 .text(function(l) { |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 } | 978 } |
| 979 | 979 |
| 980 viewWholeGraph() { | 980 viewWholeGraph() { |
| 981 var graph = this; | 981 var graph = this; |
| 982 var minScale = graph.minScale(); | 982 var minScale = graph.minScale(); |
| 983 var translation = [0, 0]; | 983 var translation = [0, 0]; |
| 984 translation = graph.getVisibleTranslation(translation, minScale); | 984 translation = graph.getVisibleTranslation(translation, minScale); |
| 985 graph.translateClipped(translation, minScale); | 985 graph.translateClipped(translation, minScale); |
| 986 } | 986 } |
| 987 } | 987 } |
| OLD | NEW |