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

Side by Side Diff: tools/turbolizer/graph-view.js

Issue 2227643002: [turbolizer] Allow selecting inputs also with numeric keyboard. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 case 53: 576 case 53:
577 case 54: 577 case 54:
578 case 55: 578 case 55:
579 case 56: 579 case 56:
580 case 57: 580 case 57:
581 // '1'-'9' 581 // '1'-'9'
582 showSelectionFrontierNodes(true, 582 showSelectionFrontierNodes(true,
583 (edge, index) => { return index == (d3.event.keyCode - 49); }, 583 (edge, index) => { return index == (d3.event.keyCode - 49); },
584 false); 584 false);
585 break; 585 break;
586 case 97:
587 case 98:
588 case 99:
589 case 100:
590 case 101:
591 case 102:
592 case 103:
593 case 104:
594 case 105:
595 // 'numpad 1'-'numpad 9'
596 showSelectionFrontierNodes(true,
597 (edge, index) => { return index == (d3.event.keyCode - 97); },
598 false);
599 break;
586 case 67: 600 case 67:
587 // 'c' 601 // 'c'
588 showSelectionFrontierNodes(true, 602 showSelectionFrontierNodes(true,
589 (edge, index) => { return edge.type == 'control'; }, 603 (edge, index) => { return edge.type == 'control'; },
590 false); 604 false);
591 break; 605 break;
592 case 69: 606 case 69:
593 // 'e' 607 // 'e'
594 showSelectionFrontierNodes(true, 608 showSelectionFrontierNodes(true,
595 (edge, index) => { return edge.type == 'effect'; }, 609 (edge, index) => { return edge.type == 'effect'; },
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 } 1002 }
989 1003
990 viewWholeGraph() { 1004 viewWholeGraph() {
991 var graph = this; 1005 var graph = this;
992 var minScale = graph.minScale(); 1006 var minScale = graph.minScale();
993 var translation = [0, 0]; 1007 var translation = [0, 0];
994 translation = graph.getVisibleTranslation(translation, minScale); 1008 translation = graph.getVisibleTranslation(translation, minScale);
995 graph.translateClipped(translation, minScale); 1009 graph.translateClipped(translation, minScale);
996 } 1010 }
997 } 1011 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698