label-studio icon indicating copy to clipboard operation
label-studio copied to clipboard

horizontalAlignment="center" broken on new versions

Open Skier23 opened this issue 11 months ago • 7 comments

Describe the bug horizontalAlignment="center" used to work on at least version 1.13 but is broken on the latest versions and does not align an image center.

To Reproduce set horizontalAlignment="center" in the labeling interface and see that tasks with an image are not centered

Expected behavior the images should be centered

Screenshots

Image

Environment (please complete the following information):

  • OS: Windows
  • Label Studio Version: 1.17.0.dev0

Additional context Add any other context about the problem here.

Skier23 avatar Feb 15 '25 16:02 Skier23

Please share your full labeling configuration.

makseq avatar Feb 16 '25 22:02 makseq

That really is strange, thank you for notifying, we'll fix it.

hlomzik avatar Feb 17 '25 16:02 hlomzik

/jira create leap

Workflow run Jira issue TRIAG-1215 is created

hlomzik avatar Feb 17 '25 16:02 hlomzik

Please share your full labeling configuration.

<View>
  <Image name="image" value="$image" horizontalAlignment="center" verticalAlignment="top" maxheight="880px" width="100%"/>
  <Choices name="choice" toName="image" choice="multiple" showInline="true" allowNested="true">
    <Choice value="TODO" style="width:140px" hotkey="" />
    <Choice value="TODO2" style="width:140px" hotkey="" />
    <Choice value="a" style="width:140px" hotkey="" />
    <Choice value="z" style="width:140px" hotkey="" />
    <Choice value="y" style="width:140px" hotkey="" />
    <Choice value="x" style="width:140px" hotkey="" />
    <Choice value="b" style="width:140px" hotkey="" />
  </Choices>
</View>

Skier23 avatar Feb 17 '25 17:02 Skier23

That really is strange, thank you for notifying, we'll fix it.

Do you know if there would be a workaround? Or if the issue is apparent what caused the change and might not be a big change, I could make changes on my local branch. Otherwise I'll likely need to downgrade to an older version as the left alignment hurts my workflow due to zooming and being able to see the choices.

Skier23 avatar Feb 18 '25 19:02 Skier23

Same issue here after upgrading from 1.14.0 to 1.15.0.

As an example, I have a 375x375 pixel image which when zoomed to fit looks like,

Image

This regardless of horizontalAlignment / verticalAlignment settings.

However, the next three images when fully zoomed out tell the story.

With horizontalAlignment="left" and verticalAlignment="top"...

Image

With horizontalAlignment="center" and verticalAlignment="center"...

Image

With horizontalAlignment="right" and verticalAlignment="bottom"...

Image

So the image is stuck on horizontalAlignment="left" and verticalAlignment="top" but annotations are positioned appropriately.

WillieMaddox avatar Apr 10 '25 18:04 WillieMaddox

@hlomzik has this been fixed in the new version? I'd love to update but without this fix I'm stuck on an old version incapable of updating.

Skier23 avatar May 15 '25 14:05 Skier23