trevorsandy / lpub3d

An LDraw™ editor for LEGO® style digital building instructions.
https://trevorsandy.github.io/lpub3d/
133 stars 19 forks source link

Step Number Placement Relative to Parts List Produces Undesired Behavior when Selecting Bottom/Left (Multistep Only) #729

Closed M-Volkmuth closed 1 year ago

M-Volkmuth commented 1 year ago

Subject

Step Number Placement Relative to Parts List Produces Undesired Behavior when Selecting Bottom/Left (Multistep Only), More specifically, The Step Number sinks to the bottom of the Step rather than just below the PLI as expected.

Environment

Screenshots

(Note: Screenshots are from release 2.4.6, but problem persists in latest version.)

LPubBug2

LPubBug3

Steps to reproduce

Download Sample.txt Change file extension to .mpd Load in LPub3D

Expected behaviour

The Step Number for each step in the multistep should render just below the PLI.

Actual behaviour

The Step Number for each step in the multistep sinks to the bottom of the Step.

Workaround

Nothing practical. I would not like to resort to manually inserting step number text and masking the actual step numbers with the background color.

Solution suggestion

Is there a bug in calculating the Y placement coordinate in the context of multisteps?

trevorsandy commented 1 year ago

Thank you for reporting this behaviour.

I'll take a look.

Cheers,

M-Volkmuth commented 1 year ago

Thanks for the update. Just checked it out. I discovered that the problem persists if you add a Multistep divider.

trevorsandy commented 1 year ago

I discovered that the problem persists if you add a Multistep divider.

Indeed. That the step number is aligned with the bottom of the tallest PLI in the divided range (multi-step row) is the default behaviour as shown in the following screenshot. As this behaviour is desired by some, it will remain in place.

StepNumberPlacement_00

However, you can enable the behaviour you desire by manually adding the meta command 0 !LPUB MULTI_STEP JUSTIFY_Y_AXIS_OUTSIDE_PLACEMENT_MULTIPLE_RANGES GLOBAL TRUE or from the Step Group Global Setup dialogue as shown in the following screenshot.

StepNumberPlacement_01

StepNumberPlacement_02

Cheers,