forked from CGM_Public/pretix_original
PDF editor: Support for Ctrl+A
This commit is contained in:
committed by
Raphael Michel
parent
ebae275a2d
commit
cc912b9ea7
@@ -825,6 +825,11 @@ var editor = {
|
|||||||
case 46: /* Delete */
|
case 46: /* Delete */
|
||||||
editor._delete();
|
editor._delete();
|
||||||
break;
|
break;
|
||||||
|
case 65: /* A */
|
||||||
|
if (e.ctrlKey) {
|
||||||
|
editor._selectAll();
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 89: /* Y */
|
case 89: /* Y */
|
||||||
if (e.ctrlKey) {
|
if (e.ctrlKey) {
|
||||||
editor._redo();
|
editor._redo();
|
||||||
@@ -871,6 +876,15 @@ var editor = {
|
|||||||
editor.dirty = true;
|
editor.dirty = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_selectAll: function () {
|
||||||
|
var group = new fabric.Group(editor.fabric.getObjects(), {
|
||||||
|
originX: 'center',
|
||||||
|
originY: 'center',
|
||||||
|
});
|
||||||
|
group.setCoords();
|
||||||
|
editor.fabric.setActiveGroup(group);
|
||||||
|
},
|
||||||
|
|
||||||
_undo: function undo() {
|
_undo: function undo() {
|
||||||
if (editor._history_pos < editor.history.length - 1) {
|
if (editor._history_pos < editor.history.length - 1) {
|
||||||
editor._history_modification_in_progress = true;
|
editor._history_modification_in_progress = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user