| 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);
|
|
|