Alignment is not working as clear as it should

Hey! Recently I was using alignment feature quite intensively in LibreOffice Draw and noticed some inconsistencies regarding it. Documentation states:

Select an object to align it to the page or select multiple objects to align them relative to each other.

But it’s not specified at all whether the order in which object are selected matter here for instance. If two or more objects selected what is used as an alignment target? Are all objects except the first one aligned relative to it, or regarding the last one?

To avoid such questions when I select two shapes I lock one of them (target shape) via Position and Size > Position. But it drastically slows down the whole process of alignment. I can’t just select objects in specific order and be sure that the last or first one will be the alignment target. While making worksheets like this:

it really produces enormous amount of friction during aligning everything perfectly as there are a lot of elements to align. And I think that this process should be made more straightforward than it is now.

Version: 26.2.4.2 (X86_64)
Build ID: 620(Build:2)
CPU threads: 8; OS: Linux 7.0; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:26.2.4.2-0ubuntu0.26.04.2
Calc: threaded

Have you considered grid alignment? You just mode your boxes and they are “magnetically” attracted on evenly-spaced positions of a grid you configure yourself.

Of course this only gives a satisfactory visual result when your boxes width is some multiple of the grid interval (or rather a multiple minus a fixed spacing distance so that the gaps between boxes are the same).

I utilized grid for aligning boxes. But these drag handles consisting of 6 rounded shapes (white ones) where aligned via Align Objects menu to these boxes. This is where the problem was, aligning these small handles.

I assume that your boxes are made of two objects:

  • a rounded rectangle with a label and coloured background
  • a tiny white shape to suggest/show a drag handle

Is it so?


You could then “align” these two components and group them as a single object. Then the composite object is positioned easily on the grid.

Sort of, yeah, several shapes like this.

I did it like that exactly, all off these words with everything surrounding them are groups. While as I said aligning these 6-shape drag handles (on top of each box with word):

was a hustle. As I needed to lock the rectangle with a word:

in it to just align 6-shape drag handle each time.

Only one shape is needed. Combining a rounded rectangle with a text box is overkill. Any shape can be labelled, including a rounded rectangle making the addition of a text box pointless.

Could you attach a sample file with one of the objects for close examination?

Yes, ofc, here it is:
man darf.odg (46.0 KB)

None of them, but the boundaries (or center) of the selection box are the target.

Then why sometimes I don’t need to lock object position and everything works perfectly fine and sometimes I need to? Objects (shown above in screenshots) were not aligned initially. I can try ofc to record the video of it, but the point is that it feels unpredictable.

@EmilyGraceSeville7cf
Your layout (as shown in the sample file) is very sophisticated (with nice outcome). All I could suggest would only reduce the construction by one shape only, the full white rounded rectangle. I don’t understand why you create this one.

When you create your “blocks”, you could have more comfort using styles. You could then have one style for conjugated verbs (red), one for infinite verbs, one for adverbs, one for nouns, … Remember that styles store all properties of a shape. Consequently, colours, size, corner radius, … can all be configured in a style. Your “pain” reduces to create a shape (don’t worry for size), apply a style and next only manage z-order. With the help of a grid, it should be quite easy to position everything (idea: align position on centre point of all shapes – except the drag handle – since this point is common to all).

I don’t think I can help more.

2 Likes

Thanks! I will consider using styles for that. :smile: I failed to introduce the issue, so the only thing I can leave ig is my feature proposal below.

Description

Implement quicker alignment options.

User interface

Add an alignment mode concept where it can be one of:

  • auto (if one object of group is selected then align relative to the page; if several are selected then align objects relative to the surrounding bounding box of everything selected like the already existing behavior)
  • last selected (if at least two objects or groups are selected; align everything relative to the last selected object or group)
  • first selected (if at least two objects or groups are selected; align everything relative to the first selected object or group)

Wrong place.

Feature requests
Feature requests should go directly to Bugzilla as Enhancements.
Log in to Bugzilla

is quoted from here:

1 Like