[yt-svn] commit/yt: MatthewTurk: Adding keyboard shortcuts to plot window. Closes #357.
Bitbucket
commits-noreply at bitbucket.org
Tue Feb 14 14:03:44 PST 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/d8351691e667/
changeset: d8351691e667
branch: yt
user: MatthewTurk
date: 2012-02-14 23:03:21
summary: Adding keyboard shortcuts to plot window. Closes #357.
affected #: 1 file
diff -r 782b3dd8bb92b1697124d6b05416b943679096a7 -r d8351691e667f8cc19eb8ea6867caeabf7a472aa yt/gui/reason/html/js/widget_plotwindow.js
--- a/yt/gui/reason/html/js/widget_plotwindow.js
+++ b/yt/gui/reason/html/js/widget_plotwindow.js
@@ -43,7 +43,78 @@
}
this.widget_keys = new Ext.KeyMap(document, [
- {key: 'z', fn: function(){control_panel.get("zoom10x").handler();}}
+ {key: 'z',
+ shift: false,
+ fn: function(){
+ control_panel.get("zoom10x").handler();
+ }
+ },
+ {key: 'Z',
+ shift: true,
+ fn: function(){
+ control_panel.get("zoom2x").handler();
+ }
+ },
+ {key: 'x',
+ shift: false,
+ fn: function(){
+ control_panel.get("zoomout10x").handler();
+ }
+ },
+ {key: 'X',
+ shift: true,
+ fn: function(){
+ control_panel.get("zoomout2x").handler();
+ }
+ },
+ {key: 'i',
+ shift: false,
+ fn: function(){
+ control_panel.get("singleuparrow").handler();
+ }
+ },
+ {key: 'k',
+ shift: false,
+ fn: function(){
+ control_panel.get("singledownarrow").handler();
+ }
+ },
+ {key: 'j',
+ shift: false,
+ fn: function(){
+ control_panel.get("singleleftarrow").handler();
+ }
+ },
+ {key: 'l',
+ shift: false,
+ fn: function(){
+ control_panel.get("singlerightarrow").handler();
+ }
+ },
+ {key: 'I',
+ shift: true,
+ fn: function(){
+ control_panel.get("doubleuparrow").handler();
+ }
+ },
+ {key: 'K',
+ shift: true,
+ fn: function(){
+ control_panel.get("doubledownarrow").handler();
+ }
+ },
+ {key: 'J',
+ shift: true,
+ fn: function(){
+ control_panel.get("doubleleftarrow").handler();
+ }
+ },
+ {key: 'L',
+ shift: true,
+ fn: function(){
+ control_panel.get("doublerightarrow").handler();
+ }
+ },
]);
var widget_keys = this.widget_keys;
widget_keys.disable();
@@ -159,6 +230,7 @@
/* the single buttons for 10% pan*/
xtype:'button',
iconCls: 'singleuparrow',
+ id: 'singleuparrow',
//text: 'North',
x: 40,
y: 10,
@@ -170,6 +242,7 @@
}, {
xtype:'button',
iconCls: 'singlerightarrow',
+ id: 'singlerightarrow',
//text:'East',
x : 60,
y : 30,
@@ -182,6 +255,7 @@
}, {
xtype:'button',
iconCls: 'singledownarrow',
+ id: 'singledownarrow',
//text: 'South',
x: 40,
y: 50,
@@ -194,6 +268,7 @@
}, {
xtype: 'button',
iconCls: 'singleleftarrow',
+ id: 'singleleftarrow',
//text: 'West',
x: 20,
y: 30,
@@ -208,6 +283,7 @@
{
xtype:'button',
iconCls: 'doubleuparrow',
+ id:'doubleuparrow',
//text: 'North',
x: 40,
y: 80,
@@ -219,6 +295,7 @@
}, {
xtype:'button',
iconCls: 'doublerightarrow',
+ id:'doublerightarrow',
//text:'East',
x : 60,
y : 100,
@@ -232,6 +309,7 @@
xtype:'button',
iconCls: 'doubledownarrow',
//text: 'South',
+ id: 'doubledownarrow',
x: 40,
y: 120,
handler: function(b,e) {
@@ -243,6 +321,7 @@
}, {
xtype: 'button',
iconCls: 'doubleleftarrow',
+ id: 'doubleleftarrow',
//text: 'West',
x: 20,
y: 100,
@@ -270,6 +349,7 @@
},{
xtype: 'button',
text: 'Zoom In 2x',
+ id: "zoom2x",
x: 10,
y: 185,
width: 80,
@@ -282,6 +362,7 @@
},{
xtype: 'button',
text: 'Zoom Out 2x',
+ id:'zoomout2x',
x: 10,
y: 210,
width: 80,
@@ -294,6 +375,7 @@
},{
xtype: 'button',
text: 'Zoom Out 10x',
+ id:'zoomout10x',
x: 10,
y: 235,
width: 80,
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list