mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
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 */
|
||||
editor._delete();
|
||||
break;
|
||||
case 65: /* A */
|
||||
if (e.ctrlKey) {
|
||||
editor._selectAll();
|
||||
}
|
||||
break;
|
||||
case 89: /* Y */
|
||||
if (e.ctrlKey) {
|
||||
editor._redo();
|
||||
@@ -871,6 +876,15 @@ var editor = {
|
||||
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() {
|
||||
if (editor._history_pos < editor.history.length - 1) {
|
||||
editor._history_modification_in_progress = true;
|
||||
|
||||
Reference in New Issue
Block a user