Clamping RelX RelY values to prevent freezing of UI #26
Open
traybug23 wants to merge 1 commit intoPathVisio:mainfrom
Open
Clamping RelX RelY values to prevent freezing of UI #26traybug23 wants to merge 1 commit intoPathVisio:mainfrom
traybug23 wants to merge 1 commit intoPathVisio:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
@mkutmon @egonw