Skip to content

Commit

Permalink
PDF-Editor: fix controls when resizing multiple objects (#3764)
Browse files Browse the repository at this point in the history
Co-authored-by: Mira <weller@rami.io>
  • Loading branch information
wiffbi and luelista committed Dec 19, 2023
1 parent 558d0f1 commit 5667da9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/pretix/static/pretixcontrol/js/ui/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,15 @@ var editor = {
$("#toolbox-position-x").val(editor._px2mm(o.left).toFixed(2));
$("#toolbox-position-y").val(editor._px2mm(bottom).toFixed(2));

if (o.type === "barcodearea") {
if (o.type === 'activeSelection') {
// limit controls to the ones which are common to every element in selection
o.forEachControl(function(control, key) {
o.setControlVisible(key, o.getObjects().every(function(obj) {
// special case „text“ in group does not support any controls
return obj.type !== "text" && obj.type !== "textarea" && obj.isControlVisible(key)
}));
});
} else if (o.type === "barcodearea") {
$("#toolbox-squaresize").val(editor._px2mm(o.height * o.scaleY).toFixed(2));
$("#toolbox-qrwhitespace").prop("checked", o.nowhitespace || false);
} else if (o.type === "imagearea") {
Expand Down

0 comments on commit 5667da9

Please sign in to comment.