mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-26 15:54:55 +01:00
fixing more bugs
This commit is contained in:
parent
ccab3bf9ec
commit
de47b638ac
@ -276,24 +276,25 @@ mindplot.DesignerKeyboard = new Class({
|
|||||||
designer.zoomOut();
|
designer.zoomOut();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
var me = this;
|
||||||
this.addShortcut(
|
this.addShortcut(
|
||||||
'right', function (event) {
|
'right', function (event) {
|
||||||
var node = model.selectedTopic();
|
var node = model.selectedTopic();
|
||||||
if (node) {
|
if (node) {
|
||||||
if (node.isCentralTopic()) {
|
if (node.isCentralTopic()) {
|
||||||
this._goToSideChild(designer, node, 'RIGHT');
|
me._goToSideChild(designer, node, 'RIGHT');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (node.getPosition().x < 0) {
|
if (node.getPosition().x < 0) {
|
||||||
this._goToParent(designer, node);
|
me._goToParent(designer, node);
|
||||||
}
|
}
|
||||||
else if (!node.areChildrenShrunken()) {
|
else if (!node.areChildrenShrunken()) {
|
||||||
this._goToChild(designer, node);
|
me._goToChild(designer, node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var centralTopic = model.getCentralTopic();
|
var centralTopic = model.getCentralTopic();
|
||||||
this._goToNode(designer, centralTopic);
|
me._goToNode(designer, centralTopic);
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@ -304,19 +305,19 @@ mindplot.DesignerKeyboard = new Class({
|
|||||||
var node = model.selectedTopic();
|
var node = model.selectedTopic();
|
||||||
if (node) {
|
if (node) {
|
||||||
if (node.isCentralTopic()) {
|
if (node.isCentralTopic()) {
|
||||||
this._goToSideChild(designer, node, 'LEFT');
|
me._goToSideChild(designer, node, 'LEFT');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (node.getPosition().x > 0) {
|
if (node.getPosition().x > 0) {
|
||||||
this._goToParent(designer, node);
|
me._goToParent(designer, node);
|
||||||
}
|
}
|
||||||
else if (!node.areChildrenShrunken()) {
|
else if (!node.areChildrenShrunken()) {
|
||||||
this._goToChild(designer, node);
|
me._goToChild(designer, node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var centralTopic = model.getCentralTopic();
|
var centralTopic = model.getCentralTopic();
|
||||||
this._goToNode(designer, centralTopic);
|
me._goToNode(designer, centralTopic);
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@ -327,11 +328,11 @@ mindplot.DesignerKeyboard = new Class({
|
|||||||
var node = model.selectedTopic();
|
var node = model.selectedTopic();
|
||||||
if (node) {
|
if (node) {
|
||||||
if (!node.isCentralTopic()) {
|
if (!node.isCentralTopic()) {
|
||||||
this._goToBrother(designer, node, 'UP');
|
me._goToBrother(designer, node, 'UP');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var centralTopic = model.getCentralTopic();
|
var centralTopic = model.getCentralTopic();
|
||||||
this._goToNode(designer, centralTopic);
|
me._goToNode(designer, centralTopic);
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@ -342,11 +343,11 @@ mindplot.DesignerKeyboard = new Class({
|
|||||||
var node = model.selectedTopic();
|
var node = model.selectedTopic();
|
||||||
if (node) {
|
if (node) {
|
||||||
if (!node.isCentralTopic()) {
|
if (!node.isCentralTopic()) {
|
||||||
this._goToBrother(designer, node, 'DOWN');
|
me._goToBrother(designer, node, 'DOWN');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var centralTopic = model.getCentralTopic();
|
var centralTopic = model.getCentralTopic();
|
||||||
this._goToNode(designer, centralTopic);
|
me._goToNode(designer, centralTopic);
|
||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
@ -287,7 +287,7 @@ mindplot.MultilineTextEditor = new Class({
|
|||||||
this._topic.getTextShape().setVisibility(true);
|
this._topic.getTextShape().setVisibility(true);
|
||||||
|
|
||||||
// Remove it form the screen ...
|
// Remove it form the screen ...
|
||||||
this._containerElem.dispose();
|
this._containerElem.remove();
|
||||||
this._containerElem = null;
|
this._containerElem = null;
|
||||||
this._timeoutId = -1;
|
this._timeoutId = -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user