Skip to content

Clamping RelX RelY values to prevent freezing of UI #26

Open
traybug23 wants to merge 1 commit intoPathVisio:mainfrom
traybug23:fix-state-property-relx-rely-coordinates
Open

Clamping RelX RelY values to prevent freezing of UI #26
traybug23 wants to merge 1 commit intoPathVisio:mainfrom
traybug23:fix-state-property-relx-rely-coordinates

Conversation

@traybug23
Copy link
Copy Markdown

@traybug23 traybug23 commented Mar 27, 2026

The earlier logic of throwing an IllegalArgumentException when RelX RelY values were going out of range was causing an UI unresponsiveness.

I added a clamping logic where if the respective state property value is greater than 1, it clamps it back to 1 and refreshes the pathway property table to showcase the change.

Similarly, if the value is less than -1, it clamps it back to -1.

I have attached a screen recording to showcase the fix.

If a value out of range is added, it automatically gets clamped and changed in PathVisio UI.

In the terminal, there's a display of a warning message regarding the clamping.

The UI changes were implemented in this PR: https://github.com/PathVisio/pathvisio4-ant/pull/51

RelX_RelY_Fix.mp4
Screenshot 2026-03-27 162530

@mkutmon @egonw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant