mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Disable scrolling with arrows in Firefox.
This commit is contained in:
parent
66fcc68677
commit
65f4238c3e
@ -225,7 +225,7 @@ mindplot.DesignerKeyboard = new Class({
|
||||
designer.selectAll();
|
||||
},
|
||||
|
||||
'right':function () {
|
||||
'right':function (event) {
|
||||
var node = model.selectedTopic();
|
||||
if (node) {
|
||||
if (node.getTopicType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
@ -243,9 +243,11 @@ mindplot.DesignerKeyboard = new Class({
|
||||
var centralTopic = model.getCentralTopic();
|
||||
this._goToNode(designer, centralTopic);
|
||||
}
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}.bind(this),
|
||||
|
||||
'left':function () {
|
||||
'left':function (event) {
|
||||
var node = model.selectedTopic();
|
||||
if (node) {
|
||||
if (node.getTopicType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
@ -263,9 +265,11 @@ mindplot.DesignerKeyboard = new Class({
|
||||
var centralTopic = model.getCentralTopic();
|
||||
this._goToNode(designer, centralTopic);
|
||||
}
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}.bind(this),
|
||||
|
||||
'up':function () {
|
||||
'up':function (event) {
|
||||
var node = model.selectedTopic();
|
||||
if (node) {
|
||||
if (node.getTopicType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
@ -275,9 +279,11 @@ mindplot.DesignerKeyboard = new Class({
|
||||
var centralTopic = model.getCentralTopic();
|
||||
this._goToNode(designer, centralTopic);
|
||||
}
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}.bind(this),
|
||||
|
||||
'down':function () {
|
||||
'down':function (event) {
|
||||
var node = model.selectedTopic();
|
||||
if (node) {
|
||||
if (node.getTopicType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
@ -287,6 +293,8 @@ mindplot.DesignerKeyboard = new Class({
|
||||
var centralTopic = model.getCentralTopic();
|
||||
this._goToNode(designer, centralTopic);
|
||||
}
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}.bind(this)
|
||||
};
|
||||
this.addEvents(keyboardEvents);
|
||||
|
Loading…
Reference in New Issue
Block a user