parent1 = selectionStart.element.parent() || undefined,
parent2 = selectionEnd.element.parent() || undefined;
+ var selectionFocus = cursor.getSelectionFocus();
if(params.toggle) {
canvas.list.create({element1: parent1, element2: parent2});
} else {
canvas.list.extractItems({element1: parent1, element2: parent2, merge: false});
}
}
+ canvas.setCurrentElement(selectionFocus.element, {caretTo: selectionFocus.offset});
});
commands.register('toggle-grid', function(canvas, params) {