Commit aa65a181 authored by jgould's avatar jgould

sorting shortcut

parent 7d54cc77
This diff is collapsed.
......@@ -44,38 +44,37 @@ morpheus.HeatMapKeyListener = function (controller) {
controller.scrollTop(0);
found = true;
} else if (e.which === 34) { // page down
// if (shiftKey) {
// var pos = controller.scrollLeft();
// controller.scrollLeft(pos
// + controller.heatmap.getUnscaledWidth() - 2);
// } else {
var pos = controller.scrollTop();
controller.scrollTop(pos + controller.heatmap.getUnscaledHeight()
- 2);
// }
found = true;
} else if (e.which === 33) { // page up
// if (shiftKey) {
// var pos = controller.scrollLeft();
// controller.scrollLeft(pos
// - controller.heatmap.getUnscaledWidth() + 2);
// } else {
var pos = controller.scrollTop();
controller.scrollTop(pos - controller.heatmap.getUnscaledHeight()
+ 2);
// }
found = true;
} else if (e.which === 38) { // up arrow
if (commandKey) { // to top
controller.scrollTop(0);
var active = controller.getActiveComponent();
if (active !== -1) {
controller.sortBasedOnSelection(morpheus.SortKey.SortOrder.ASCENDING,
active !== 0, e && e.shiftKey);
}
} else {
controller.scrollTop(controller.scrollTop() - 8);
}
found = true;
} else if (e.which === 40) {// down arrow
if (commandKey) { // to bottom
controller
.scrollTop(controller.heatmap.getPreferredSize().height);
// controller
// .scrollTop(controller.heatmap.getPreferredSize().height);
var active = controller.getActiveComponent();
if (active !== -1) {
controller.sortBasedOnSelection(morpheus.SortKey.SortOrder.DESCENDING,
active !== 0, e && e.shiftKey);
}
} else {
controller.scrollTop(controller.scrollTop() + 8);
}
......
......@@ -838,8 +838,8 @@ morpheus.VectorTrack.prototype = {
var SORT_ASC = 'Sort Ascending';
var SORT_DESC = 'Sort Descending';
var FILTER = 'Filter...';
var SORT_SEL_ASC = 'Sort Heat Map Ascending';
var SORT_SEL_DESC = 'Sort Heat Map Descending';
var SORT_SEL_ASC = 'Sort Heat Map Ascending \u2191';
var SORT_SEL_DESC = 'Sort Heat Map Descending \u2193';
var SORT_SEL_TOP_N = 'Sort Heat Map Descending/Ascending';
var DISPLAY_BAR = 'Show Bar Chart';
var DISPLAY_STACKED_BAR = 'Show Stacked Bar Chart';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment