fixes #347. changes ctrl-r for remove from map to ctrl-m
This commit is contained in:
parent
5c05c6bb83
commit
ecc2ee9fea
2 changed files with 22 additions and 18 deletions
|
@ -8405,7 +8405,11 @@ $jit.RGraph = new Class( {
|
|||
|
||||
*/
|
||||
refresh: function(){
|
||||
this.compute();
|
||||
|
||||
// START METAMAPS CODE
|
||||
// this.compute();
|
||||
// END METAMAPS CODE
|
||||
// ORIGINAL CODE: this.compute();
|
||||
this.plot();
|
||||
},
|
||||
|
||||
|
@ -9119,7 +9123,10 @@ $jit.ForceDirected = new Class( {
|
|||
Computes positions and plots the tree.
|
||||
*/
|
||||
refresh: function() {
|
||||
this.compute();
|
||||
// START METAMAPS CODE
|
||||
// this.compute();
|
||||
// END METAMAPS CODE
|
||||
// ORIGINAL CODE: this.compute();
|
||||
this.plot();
|
||||
},
|
||||
|
||||
|
|
|
@ -2783,17 +2783,17 @@ Metamaps.Listeners = {
|
|||
init: function () {
|
||||
|
||||
$(document).on('keydown', function (e) {
|
||||
if (!(Metamaps.Active.Map || Metamaps.Active.Topic)) return;
|
||||
|
||||
switch (e.which) {
|
||||
case 13:
|
||||
if (Metamaps.Active.Map) Metamaps.JIT.enterKeyHandler();
|
||||
case 13: // if enter key is pressed
|
||||
Metamaps.JIT.enterKeyHandler();
|
||||
e.preventDefault();
|
||||
break;
|
||||
case 27:
|
||||
if (Metamaps.Active.Map) Metamaps.JIT.escKeyHandler();
|
||||
case 27: // if esc key is pressed
|
||||
Metamaps.JIT.escKeyHandler();
|
||||
break;
|
||||
case 65: //if a or A is pressed
|
||||
case 97:
|
||||
|
||||
if (e.ctrlKey){
|
||||
Metamaps.Control.deselectAllNodes();
|
||||
Metamaps.Control.deselectAllEdges();
|
||||
|
@ -2808,29 +2808,25 @@ Metamaps.Listeners = {
|
|||
|
||||
break;
|
||||
case 69: //if e or E is pressed
|
||||
case 101:
|
||||
if (e.ctrlKey){
|
||||
e.preventDefault();
|
||||
Metamaps.JIT.zoomExtents();
|
||||
}
|
||||
break;
|
||||
case 82: //if r or R is pressed
|
||||
case 114:
|
||||
/*if (e.ctrlKey){
|
||||
case 77: //if m or M is pressed
|
||||
if (e.ctrlKey){
|
||||
e.preventDefault();
|
||||
Metamaps.Control.removeSelectedNodes();
|
||||
Metamaps.Control.removeSelectedEdges();
|
||||
}*/
|
||||
}
|
||||
break;
|
||||
case 68: //if d or D is pressed
|
||||
case 100:
|
||||
if (e.ctrlKey){
|
||||
e.preventDefault();
|
||||
Metamaps.Control.deleteSelected();
|
||||
}
|
||||
break;
|
||||
case 72: //if h or H is pressed
|
||||
case 104:
|
||||
if (e.ctrlKey){
|
||||
e.preventDefault();
|
||||
Metamaps.Control.hideSelectedNodes();
|
||||
|
@ -2842,9 +2838,10 @@ Metamaps.Listeners = {
|
|||
}
|
||||
});
|
||||
|
||||
//$(window).resize(function () {
|
||||
// Metamaps.Visualize.mGraph.canvas.resize($(window).width(), $(window).height());
|
||||
//});
|
||||
$(window).resize(function () {
|
||||
if (Metamaps.Visualize && Metamaps.Visualize.mGraph) Metamaps.Visualize.mGraph.canvas.resize($(window).width(), $(window).height());
|
||||
if (Metamaps.Famous && Metamaps.Famous.maps.surf) Metamaps.Famous.maps.hide();
|
||||
});
|
||||
}
|
||||
}; // end Metamaps.Listeners
|
||||
|
||||
|
|
Loading…
Reference in a new issue