mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 23:44:54 +01:00
Fix collapse using keybard.
This commit is contained in:
parent
1df9afda1b
commit
31c86d053d
@ -351,6 +351,27 @@ mindplot.Designer = new Class({
|
||||
return this._model;
|
||||
},
|
||||
|
||||
|
||||
shrinkSelectedBranch:function () {
|
||||
var nodes = this.getModel().filterSelectedTopics();
|
||||
if (nodes.length <= 0) {
|
||||
// If there are more than one node selected,
|
||||
$notify($msg('ONE_TOPIC_MUST_BE_SELECTED'));
|
||||
return;
|
||||
|
||||
}
|
||||
if (nodes.length != 1) {
|
||||
// If there are more than one node selected,
|
||||
$notify($msg('ONLY_ONE_TOPIC_MUST_BE_SELECTED'));
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute event ...
|
||||
var topic = nodes[0];
|
||||
this._actionDispatcher.shrinkBranch([topic.getId()], !topic.areChildrenShrunken());
|
||||
|
||||
},
|
||||
|
||||
createChildForSelectedNode:function () {
|
||||
var nodes = this.getModel().filterSelectedTopics();
|
||||
if (nodes.length <= 0) {
|
||||
|
@ -49,12 +49,7 @@ mindplot.DesignerKeyboard = new Class({
|
||||
}.bind(this),
|
||||
|
||||
'space':function () {
|
||||
var node = model.selectedTopic();
|
||||
if (node) {
|
||||
var model = topic.getModel();
|
||||
var isShrink = !model.areChildrenShrunken();
|
||||
topic.setChildrenShrunken(isShrink);
|
||||
}
|
||||
designer.shrinkSelectedBranch();
|
||||
}.bind(this),
|
||||
|
||||
'f2':function () {
|
||||
@ -68,8 +63,7 @@ mindplot.DesignerKeyboard = new Class({
|
||||
designer.deleteCurrentNode();
|
||||
}.bind(this),
|
||||
|
||||
'enter' :
|
||||
function() {
|
||||
'enter':function () {
|
||||
designer.createSiblingForSelectedNode();
|
||||
}.bind(this),
|
||||
|
||||
|
@ -624,7 +624,6 @@ mindplot.Topic = new Class({
|
||||
model.setChildrenShrunken(value);
|
||||
|
||||
// Change render base on the state.
|
||||
|
||||
var shrinkConnector = this.getShrinkConnector();
|
||||
if ($defined(shrinkConnector)) {
|
||||
shrinkConnector.changeRender(value);
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 1.1 KiB |
@ -202,4 +202,5 @@ SAVE_CHANGES=Save Chages
|
||||
CHANGE_TEXT_ITALIC=Change Text Italic
|
||||
DESELECT_ALL_TOPIC=Deselect All Topic
|
||||
SHORTCUTS=Shortcuts
|
||||
COLLAPSE_CHILDREN=Collapse Children
|
||||
|
||||
|
@ -203,4 +203,5 @@ SAVE_CHANGES=Guardar los Cambios
|
||||
CHANGE_TEXT_ITALIC=Cambiar Texto a Italica
|
||||
DESELECT_ALL_TOPIC=Revertir Selecci\u00f3n de T\u00f3picos
|
||||
SHORTCUTS=Shortcuts
|
||||
COLLAPSE_CHILDREN=Colapsar Hijos
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 1.1 KiB |
@ -63,6 +63,11 @@
|
||||
<td><spring:message code="JUST_START_TYPING"/> | F2</td>
|
||||
<td><spring:message code="JUST_START_TYPING"/> | F2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><spring:message code="COLLAPSE_CHILDREN"/></td>
|
||||
<td>Space bar</td>
|
||||
<td>Space bar</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><spring:message code="TOPIC_NAVIGATION"/></td>
|
||||
<td><spring:message code="ARROW_KEYS"/></td>
|
||||
|
Loading…
Reference in New Issue
Block a user