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(){
|
refresh: function(){
|
||||||
this.compute();
|
|
||||||
|
// START METAMAPS CODE
|
||||||
|
// this.compute();
|
||||||
|
// END METAMAPS CODE
|
||||||
|
// ORIGINAL CODE: this.compute();
|
||||||
this.plot();
|
this.plot();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -9119,7 +9123,10 @@ $jit.ForceDirected = new Class( {
|
||||||
Computes positions and plots the tree.
|
Computes positions and plots the tree.
|
||||||
*/
|
*/
|
||||||
refresh: function() {
|
refresh: function() {
|
||||||
this.compute();
|
// START METAMAPS CODE
|
||||||
|
// this.compute();
|
||||||
|
// END METAMAPS CODE
|
||||||
|
// ORIGINAL CODE: this.compute();
|
||||||
this.plot();
|
this.plot();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -2783,17 +2783,17 @@ Metamaps.Listeners = {
|
||||||
init: function () {
|
init: function () {
|
||||||
|
|
||||||
$(document).on('keydown', function (e) {
|
$(document).on('keydown', function (e) {
|
||||||
|
if (!(Metamaps.Active.Map || Metamaps.Active.Topic)) return;
|
||||||
|
|
||||||
switch (e.which) {
|
switch (e.which) {
|
||||||
case 13:
|
case 13: // if enter key is pressed
|
||||||
if (Metamaps.Active.Map) Metamaps.JIT.enterKeyHandler();
|
Metamaps.JIT.enterKeyHandler();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
break;
|
break;
|
||||||
case 27:
|
case 27: // if esc key is pressed
|
||||||
if (Metamaps.Active.Map) Metamaps.JIT.escKeyHandler();
|
Metamaps.JIT.escKeyHandler();
|
||||||
break;
|
break;
|
||||||
case 65: //if a or A is pressed
|
case 65: //if a or A is pressed
|
||||||
case 97:
|
|
||||||
|
|
||||||
if (e.ctrlKey){
|
if (e.ctrlKey){
|
||||||
Metamaps.Control.deselectAllNodes();
|
Metamaps.Control.deselectAllNodes();
|
||||||
Metamaps.Control.deselectAllEdges();
|
Metamaps.Control.deselectAllEdges();
|
||||||
|
@ -2808,29 +2808,25 @@ Metamaps.Listeners = {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 69: //if e or E is pressed
|
case 69: //if e or E is pressed
|
||||||
case 101:
|
|
||||||
if (e.ctrlKey){
|
if (e.ctrlKey){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
Metamaps.JIT.zoomExtents();
|
Metamaps.JIT.zoomExtents();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 82: //if r or R is pressed
|
case 77: //if m or M is pressed
|
||||||
case 114:
|
if (e.ctrlKey){
|
||||||
/*if (e.ctrlKey){
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
Metamaps.Control.removeSelectedNodes();
|
Metamaps.Control.removeSelectedNodes();
|
||||||
Metamaps.Control.removeSelectedEdges();
|
Metamaps.Control.removeSelectedEdges();
|
||||||
}*/
|
}
|
||||||
break;
|
break;
|
||||||
case 68: //if d or D is pressed
|
case 68: //if d or D is pressed
|
||||||
case 100:
|
|
||||||
if (e.ctrlKey){
|
if (e.ctrlKey){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
Metamaps.Control.deleteSelected();
|
Metamaps.Control.deleteSelected();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 72: //if h or H is pressed
|
case 72: //if h or H is pressed
|
||||||
case 104:
|
|
||||||
if (e.ctrlKey){
|
if (e.ctrlKey){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
Metamaps.Control.hideSelectedNodes();
|
Metamaps.Control.hideSelectedNodes();
|
||||||
|
@ -2842,9 +2838,10 @@ Metamaps.Listeners = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//$(window).resize(function () {
|
$(window).resize(function () {
|
||||||
// Metamaps.Visualize.mGraph.canvas.resize($(window).width(), $(window).height());
|
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
|
}; // end Metamaps.Listeners
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue