mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2025-02-18 05:48:14 +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;
|
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 () {
|
createChildForSelectedNode:function () {
|
||||||
var nodes = this.getModel().filterSelectedTopics();
|
var nodes = this.getModel().filterSelectedTopics();
|
||||||
if (nodes.length <= 0) {
|
if (nodes.length <= 0) {
|
||||||
|
@ -49,12 +49,7 @@ mindplot.DesignerKeyboard = new Class({
|
|||||||
}.bind(this),
|
}.bind(this),
|
||||||
|
|
||||||
'space':function () {
|
'space':function () {
|
||||||
var node = model.selectedTopic();
|
designer.shrinkSelectedBranch();
|
||||||
if (node) {
|
|
||||||
var model = topic.getModel();
|
|
||||||
var isShrink = !model.areChildrenShrunken();
|
|
||||||
topic.setChildrenShrunken(isShrink);
|
|
||||||
}
|
|
||||||
}.bind(this),
|
}.bind(this),
|
||||||
|
|
||||||
'f2':function () {
|
'f2':function () {
|
||||||
@ -68,8 +63,7 @@ mindplot.DesignerKeyboard = new Class({
|
|||||||
designer.deleteCurrentNode();
|
designer.deleteCurrentNode();
|
||||||
}.bind(this),
|
}.bind(this),
|
||||||
|
|
||||||
'enter' :
|
'enter':function () {
|
||||||
function() {
|
|
||||||
designer.createSiblingForSelectedNode();
|
designer.createSiblingForSelectedNode();
|
||||||
}.bind(this),
|
}.bind(this),
|
||||||
|
|
||||||
|
@ -624,7 +624,6 @@ mindplot.Topic = new Class({
|
|||||||
model.setChildrenShrunken(value);
|
model.setChildrenShrunken(value);
|
||||||
|
|
||||||
// Change render base on the state.
|
// Change render base on the state.
|
||||||
|
|
||||||
var shrinkConnector = this.getShrinkConnector();
|
var shrinkConnector = this.getShrinkConnector();
|
||||||
if ($defined(shrinkConnector)) {
|
if ($defined(shrinkConnector)) {
|
||||||
shrinkConnector.changeRender(value);
|
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
|
CHANGE_TEXT_ITALIC=Change Text Italic
|
||||||
DESELECT_ALL_TOPIC=Deselect All Topic
|
DESELECT_ALL_TOPIC=Deselect All Topic
|
||||||
SHORTCUTS=Shortcuts
|
SHORTCUTS=Shortcuts
|
||||||
|
COLLAPSE_CHILDREN=Collapse Children
|
||||||
|
|
||||||
|
@ -203,4 +203,5 @@ SAVE_CHANGES=Guardar los Cambios
|
|||||||
CHANGE_TEXT_ITALIC=Cambiar Texto a Italica
|
CHANGE_TEXT_ITALIC=Cambiar Texto a Italica
|
||||||
DESELECT_ALL_TOPIC=Revertir Selecci\u00f3n de T\u00f3picos
|
DESELECT_ALL_TOPIC=Revertir Selecci\u00f3n de T\u00f3picos
|
||||||
SHORTCUTS=Shortcuts
|
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>
|
||||||
<td><spring:message code="JUST_START_TYPING"/> | F2</td>
|
<td><spring:message code="JUST_START_TYPING"/> | F2</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><spring:message code="COLLAPSE_CHILDREN"/></td>
|
||||||
|
<td>Space bar</td>
|
||||||
|
<td>Space bar</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><spring:message code="TOPIC_NAVIGATION"/></td>
|
<td><spring:message code="TOPIC_NAVIGATION"/></td>
|
||||||
<td><spring:message code="ARROW_KEYS"/></td>
|
<td><spring:message code="ARROW_KEYS"/></td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user