Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: tools/turbolizer/turbo-visualizer.js

Issue 2059193002: [turbolizer] Features and bug-fixes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/turbolizer/turbo-visualizer.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/turbolizer/turbo-visualizer.js
diff --git a/tools/turbolizer/turbo-visualizer.js b/tools/turbolizer/turbo-visualizer.js
index 7c989e16327c3598b03b019ec5404d62a1a9050e..d85be6b863b32c8b0d6a45248d167605477ad36f 100644
--- a/tools/turbolizer/turbo-visualizer.js
+++ b/tools/turbolizer/turbo-visualizer.js
@@ -44,6 +44,10 @@ document.onload = (function(d3){
}
}
+ function toggleSourceExpanded() {
+ setSourceExpanded(!sourceExpanded);
+ }
+
function setSourceExpanded(newState) {
sourceExpanded = newState;
updatePanes();
@@ -60,6 +64,10 @@ document.onload = (function(d3){
}
}
+ function toggleDisassemblyExpanded() {
+ setDisassemblyExpanded(!disassemblyExpanded);
+ }
+
function setDisassemblyExpanded(newState) {
disassemblyExpanded = newState;
updatePanes();
@@ -118,26 +126,14 @@ document.onload = (function(d3){
selectionBroker = new SelectionBroker();
function initializeHandlers(g) {
- d3.select("#source-expand").on("click", function(){
- setSourceExpanded(true);
- setTimeout(function(){
- g.fitGraphViewToWindow();
- }, 1000);
- });
- d3.select("#source-shrink").on("click", function(){
- setSourceExpanded(false);
- setTimeout(function(){
- g.fitGraphViewToWindow();
- }, 1000);
- });
- d3.select("#disassembly-expand").on("click", function(){
- setDisassemblyExpanded(true);
+ d3.select("#source-collapse").on("click", function(){
+ toggleSourceExpanded(true);
setTimeout(function(){
g.fitGraphViewToWindow();
}, 1000);
});
- d3.select("#disassembly-shrink").on("click", function(){
- setDisassemblyExpanded(false);
+ d3.select("#disassembly-collapse").on("click", function(){
+ toggleDisassemblyExpanded();
setTimeout(function(){
g.fitGraphViewToWindow();
}, 1000);
« no previous file with comments | « tools/turbolizer/turbo-visualizer.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698