| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 document.onload = (function(d3){ | 5 document.onload = (function(d3){ |
| 6 "use strict"; | 6 "use strict"; |
| 7 var jsonObj; | 7 var jsonObj; |
| 8 var sourceExpandClassList = document.getElementById(SOURCE_EXPAND_ID).classLis
t; | 8 var sourceExpandClassList = document.getElementById(SOURCE_EXPAND_ID).classLis
t; |
| 9 var sourceCollapseClassList = document.getElementById(SOURCE_COLLAPSE_ID).clas
sList; | 9 var sourceCollapseClassList = document.getElementById(SOURCE_COLLAPSE_ID).clas
sList; |
| 10 var sourceExpanded = sourceCollapseClassList.contains(COLLAPSE_PANE_BUTTON_VIS
IBLE); | 10 var sourceExpanded = sourceCollapseClassList.contains(COLLAPSE_PANE_BUTTON_VIS
IBLE); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 d3.select("#right").classed("scrollable", true); | 135 d3.select("#right").classed("scrollable", true); |
| 136 } | 136 } |
| 137 | 137 |
| 138 selectionBroker = new SelectionBroker(); | 138 selectionBroker = new SelectionBroker(); |
| 139 | 139 |
| 140 function initializeHandlers(g) { | 140 function initializeHandlers(g) { |
| 141 d3.select("#source-collapse").on("click", function(){ | 141 d3.select("#source-collapse").on("click", function(){ |
| 142 toggleSourceExpanded(true); | 142 toggleSourceExpanded(true); |
| 143 setTimeout(function(){ | 143 setTimeout(function(){ |
| 144 g.fitGraphViewToWindow(); | 144 g.fitGraphViewToWindow(); |
| 145 }, 1000); | 145 }, 300); |
| 146 }); | 146 }); |
| 147 d3.select("#disassembly-collapse").on("click", function(){ | 147 d3.select("#disassembly-collapse").on("click", function(){ |
| 148 toggleDisassemblyExpanded(); | 148 toggleDisassemblyExpanded(); |
| 149 setTimeout(function(){ | 149 setTimeout(function(){ |
| 150 g.fitGraphViewToWindow(); | 150 g.fitGraphViewToWindow(); |
| 151 }, 1000); | 151 }, 300); |
| 152 }); | 152 }); |
| 153 window.onresize = function(){ | 153 window.onresize = function(){ |
| 154 fitPanesToParents(); | 154 fitPanesToParents(); |
| 155 }; | 155 }; |
| 156 d3.select("#hidden-file-upload").on("change", function() { | 156 d3.select("#hidden-file-upload").on("change", function() { |
| 157 if (window.File && window.FileReader && window.FileList) { | 157 if (window.File && window.FileReader && window.FileList) { |
| 158 var uploadFile = this.files[0]; | 158 var uploadFile = this.files[0]; |
| 159 var filereader = new window.FileReader(); | 159 var filereader = new window.FileReader(); |
| 160 var consts = Node.consts; | 160 var consts = Node.consts; |
| 161 filereader.onload = function(){ | 161 filereader.onload = function(){ |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 empty = new EmptyView(EMPTY_PANE_ID, selectionBroker); | 248 empty = new EmptyView(EMPTY_PANE_ID, selectionBroker); |
| 249 | 249 |
| 250 initializeHandlers(graph); | 250 initializeHandlers(graph); |
| 251 | 251 |
| 252 setSourceExpanded(getLastExpandedState("source", true)); | 252 setSourceExpanded(getLastExpandedState("source", true)); |
| 253 setDisassemblyExpanded(getLastExpandedState("disassembly", false)); | 253 setDisassemblyExpanded(getLastExpandedState("disassembly", false)); |
| 254 | 254 |
| 255 displayPhaseView(empty, null); | 255 displayPhaseView(empty, null); |
| 256 fitPanesToParents(); | 256 fitPanesToParents(); |
| 257 })(window.d3); | 257 })(window.d3); |
| OLD | NEW |