Bug 127507 - Make alignment dependent on the first selection and mark this object differently
Summary: Make alignment dependent on the first selection and mark this object differently
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Object-Selection-Alignment
  Show dependency treegraph
 
Reported: 2019-09-11 21:23 UTC by Eyal Rozenberg
Modified: 2021-05-25 09:58 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Various ways to left-align object boundaries. (16.59 KB, application/vnd.oasis.opendocument.graphics)
2020-05-22 16:38 UTC, Eyal Rozenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2019-09-11 21:23:53 UTC
Description:
Let's suppose we're left-aligning two shapes, at X positions 1 cm and 2 cm. We could:

* Align their left edges to 1 cm (choose the leftmost)
* Align their left edges to 2 cm (choose the rightmost)
* Align their left edges to 1.5 cm (choose the average)

LO Draw currently chooses the first option - for left-aligning. For right-aligning it's the last option, and for centering it's the middle option.

This is not necessarily what the user wants, or needs. S/he may have some element perfectly in place, then want to align all other elements with it. While it's true you could sort of do this with align, it's at the very least inconvenient and annoying to do so (e.g. using rulers); also, due to UI accuracy issues (can't go lower than 0.01 cm), the user may not always correctly be able t manually align the boxes.

I would like for the choice between the three behaviors above to be made available - some GUI'ish way.

Steps to Reproduce:
Create two squares of dimension 1 and place them at a distance of 1 x their size horizontally and 3 x their size vertically for a while. The align them and un-align them in several ways.

Actual Results:
N/A

Expected Results:
N/A


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 ian 2020-03-26 13:45:15 UTC
Thank you for reporting the suggestion.

I have set the bug report's status to "enhancement."
Comment 2 Eyal Rozenberg 2020-03-26 17:52:43 UTC
(In reply to ian from comment #1)
> Thank you for reporting the suggestion.

Thank me by confirming the issue...
Comment 3 Heiko Tietze 2020-05-18 09:33:35 UTC
Users have "several ways" to align objects to left, center and right as well as top, middle, bottom. And if you group the objects you can move the group later to some other place. I don't see the need for enhancements, in particular together with grouing.
Comment 4 Eyal Rozenberg 2020-05-18 10:02:21 UTC
(In reply to Heiko Tietze from comment #3)
> Users have "several ways" to align objects to left, center and right 

I think you may have misunderstood what I was describing. The three alternatives I mentioned all exist for each single type of alignment - the users do _not_ have a way to choose between them. (Nor do they even know what logic LO will use to choose among the alternatives.)

> And if you group the objects you can move the group later to some other place

That's also not what I meant, because moving a group does not change the relative alignment of group elements. Also, you _can't_ move the group to a position (horizontal position in my example) which is based on the current position of the group or its elements. Or rather, you can, but only if you write it down and feed it manually as a new position for the group - as once you start dragging and moving the group around, it is no longer in that original position.
Comment 5 Heiko Tietze 2020-05-18 10:11:09 UTC
(In reply to Eyal Rozenberg from comment #4)
> I think you may have misunderstood what I was describing.

Please attach a test document so we can talk about a concrete example.
Comment 6 Eyal Rozenberg 2020-05-22 16:38:43 UTC
Created attachment 161153 [details]
Various ways to left-align object boundaries.

A document illustrating the missing functionality.
Comment 7 V Stuart Foote 2020-05-22 17:28:28 UTC
Worth doing or "out of scope"?

Individual shape objects can be placed and repositioned fairly precisely, to 1/100mm, but then have limited ability to manipulate draw objects relative to other draw objects, the OPs alignment behaviors. 

To me it would be nice to do, but is a bit of a illustration/DTP workflow corner case--not really needed for general use. 

Otherwise could alignment awareness (to grid, or proximity to other objects) be built into the Drawing objects?

@Justin, Tomaž I know the Draw shape handling is out of your 'wheelhouse' but how do you feel about additional alignment function beyond our legacy set?
Comment 8 Eyal Rozenberg 2020-05-22 17:53:18 UTC
(In reply to V Stuart Foote from comment #7)
> Worth doing or "out of scope"?
> 
> Individual shape objects can be placed and repositioned fairly precisely, to
> 1/100mm,

No, they can't; at least, not by the LO Draw UI. The figure is 1/100 of cm - as noted in bug 44267. That is quite unprecise. But no less important that the actual precision is the fact that it's much less precise than what LO can do internally, e.g. when aligning shapes.

> To me it would be nice to do, but is a bit of a illustration/DTP workflow
> corner case--not really needed for general use. 

This is not more of a corner-case than alignment in general - because at least two and possibly all three of the behaviors I listed are just as desirable. Not to mention other options, such as:

* Use the left boundary of the first selected object
* Use the left boundary of the last selected object
Comment 9 QA Administrators 2020-05-23 03:44:22 UTC Comment hidden (obsolete)
Comment 10 Heiko Tietze 2020-05-25 10:06:10 UTC
(In reply to Eyal Rozenberg from comment #6)
> Created attachment 161153 [details]
> Various ways to left-align object boundaries.

The options sound a bit random to me. "Rightmost left boundary", why not leftmost of the right, or left-most of the second object etc. And the current workflow with left-aligning plus moving is also not too laborious.

But what could be an enhancement, easy to understand at the same time as supporting your needs, is to align with the first selected object. Would that be a compromise?
Comment 11 Eyal Rozenberg 2020-05-25 10:31:04 UTC
(In reply to Heiko Tietze from comment #10)
> The options sound a bit random to me.

You mean "arbitrary" I believe.

> "Rightmost left boundary", why not
> leftmost of the right

Because those are only examples of aligning objects' _left_ edges; the right edges can't factor into the choice of where to align at. I didn't want to have dozens of examples in the file.

> And the
> current workflow with left-aligning plus moving is also not too laborious.

I'm sorry? After you've left-aligned things to a boundary which isn't the one you wanted, you no longer have one of the previous left-boundaries to align to. Also, there's the fact that you don't know in advance which left boundary it will be, until you've experimented, and even then it's easy to forget since there's no indication of the app's choice.

Heiko, it really seems like you're talking about this feature while rarely, if ever, using it.


> But what could be an enhancement, easy to understand at the same time as
> supporting your needs, is to align with the first selected object. Would
> that be a compromise?

That would be essentially satisfactory.

However - in addition to implementing that logic, it's important IMHO for it to be made clear to the user somehow that this is the policy (and not just by trying and observing the result). Some ideas:

* There is currently no indication, in general, of which shape, in a set of selected shapes, is the first selected. Perhaps that could be indicated, and would be a hint regarding the effect of alignment.
* The toolbar buttons for alignment could perhaps have a hover behavior of previewing the results of the alignment, or at least of a dotted line at which the objects will be aligned.
Comment 12 Heiko Tietze 2020-05-25 10:42:43 UTC
(In reply to Eyal Rozenberg from comment #11)
> Heiko, it really seems like you're talking about this feature while rarely,
> if ever, using it.
Since we had similar controversies before: I'm trying to generalize request and balance the individual need with a) simplicity of use for everyone, b) flexibility for future enhancements, and c) implementation effort, in/out of scope etc. Don't be upset when I'm asking questions or suggest alternative solutions.
 
> * There is currently no indication, in general, of which shape, in a set of
> selected shapes, is the first selected. Perhaps that could be indicated, and
> would be a hint regarding the effect of alignment.
Good point. With point selection (F8) the first could use a different color but nothing comes in mind for normal selections.

> * The toolbar buttons for alignment could perhaps have a hover behavior of
> previewing the results of the alignment, or at least of a dotted line at
> which the objects will be aligned.
That's likely a very tricky task with a huge coding effort.
Comment 13 Eyal Rozenberg 2020-05-25 10:49:49 UTC
(In reply to Heiko Tietze from comment #12)
> (In reply to Eyal Rozenberg from comment #11)
> Since we had similar controversies before: I'm trying to generalize request
> and balance the individual need with a) simplicity of use for everyone, b)
> flexibility for future enhancements, and c) implementation effort, in/out of
> scope etc. Don't be upset when I'm asking questions or suggest alternative
> solutions.

Ok, I'm sorry.

> > * There is currently no indication, in general, of which shape, in a set of
> > selected shapes, is the first selected. Perhaps that could be indicated, and
> > would be a hint regarding the effect of alignment.
> Good point. With point selection (F8) the first could use a different color
> but nothing comes in mind for normal selections.

Shall I create a separate issue for that? And speaking of separate issues, would you rather we closed this bug and opened a different one entitled "always align based on first selected shape"?
Comment 14 Heiko Tietze 2020-05-25 11:21:32 UTC
(In reply to Eyal Rozenberg from comment #13)
> Shall I create a separate issue for that? And speaking of separate issues,
> would you rather we closed this bug and opened a different one entitled
> "always align based on first selected shape"?

If we agree on this solution I'd prefer to change the summary here since the discussion gives valuable input. But let's wait a bit longer. Curious about Regina's opinion.