Added shortcut key Ctrl+Enter on the Expand button
This commit is contained in:
parent
ac7a5afe37
commit
a03ea9a2d0
|
@ -1131,7 +1131,7 @@ Node.prototype._getDomField = function(silent) {
|
|||
Node.prototype.clearDom = function() {
|
||||
// TODO: hide the node first?
|
||||
//this.hide();
|
||||
// TOOD: recursively clear dom?
|
||||
// TODO: recursively clear dom?
|
||||
|
||||
this.dom = {};
|
||||
};
|
||||
|
@ -1226,9 +1226,8 @@ Node.prototype._onDragStart = function (event) {
|
|||
* @private
|
||||
*/
|
||||
Node.prototype._onDrag = function (event) {
|
||||
// TODO: this method has grown to large. Split it in a number of methods
|
||||
// TODO: this method has grown too large. Split it in a number of methods
|
||||
event = event || window.event;
|
||||
// TODO: make a separate function to get the absolute mouseY and mouseX
|
||||
var mouseY = util.getMouseY(event);
|
||||
var mouseX = util.getMouseX(event);
|
||||
|
||||
|
@ -1745,7 +1744,6 @@ Node.prototype.onEvent = function (event) {
|
|||
}
|
||||
|
||||
// expand events
|
||||
var domExpand = dom.expand;
|
||||
if (type == 'click' && target == dom.expand) {
|
||||
if (expandable) {
|
||||
var recurse = event.ctrlKey; // with ctrl-key, expand/collapse all
|
||||
|
@ -1911,6 +1909,15 @@ Node.prototype.onKeyDown = function (event) {
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (target == this.dom.expand) {
|
||||
var expandable = this._hasChilds();
|
||||
if (expandable) {
|
||||
var recurse = event.ctrlKey; // with ctrl-key, expand/collapse all
|
||||
this._onExpand(recurse);
|
||||
target.focus();
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (keynum == 68) { // D
|
||||
if (ctrlKey) { // Ctrl+D
|
||||
|
@ -2700,7 +2707,6 @@ Node.prototype.showContextMenu = function (anchor, onClose) {
|
|||
'className': 'type-string',
|
||||
'title': titles.string,
|
||||
'click': function () {
|
||||
// TODO: settings type string does not work, will become auto
|
||||
node._onInsertBefore('', '', 'string');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue