Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK-8290016: IGV: Fix graph panning when mouse dragged outside of window #9470

Closed
wants to merge 3 commits into from

Conversation

tobiasholenstein
Copy link
Contributor

@tobiasholenstein tobiasholenstein commented Jul 12, 2022

A graph in IGV can be moved by dragging it with the left mouse button (called panning).
panning

If the mouse left the visible window of the graph during dragging, the diagram started to move in the opposite direction. This was annoying. Now panning stops as soon as the mouse leaves the window.
stop reverse panning

In selection mode, the graph still moves when the mouse is dragged outside the window, as this is meant to make a larger selection.
keep panning for selection


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8290016: IGV: Fix graph panning when mouse dragged outside of window

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9470/head:pull/9470
$ git checkout pull/9470

Update a local copy of the PR:
$ git checkout pull/9470
$ git pull https://git.openjdk.org/jdk pull/9470/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9470

View PR using the GUI difftool:
$ git pr show -t 9470

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9470.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 12, 2022

👋 Welcome back tholenstein! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jul 12, 2022

@tobiasholenstein The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Jul 12, 2022
@tobiasholenstein tobiasholenstein marked this pull request as ready for review July 12, 2022 14:07
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 12, 2022
@mlbridge
Copy link

mlbridge bot commented Jul 12, 2022

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good.

@openjdk
Copy link

openjdk bot commented Jul 12, 2022

@tobiasholenstein This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8290016: IGV: Fix graph panning when mouse dragged outside of window

Reviewed-by: kvn, thartmann

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 141 new commits pushed to the master branch:

  • 799a2c8: 8276561: URL$DefaultFactory::PREFIX should be static final
  • 52cc6cd: 8288723: Avoid redundant ConcurrentHashMap.get call in java.time
  • 3582fd9: 8290359: Ensure that all directory streams are closed in jdk.link
  • 53fc495: 8290316: Ensure that all directory streams are closed in java.base
  • db1e44c: 8290353: ModuleReader::list specification should suggest closing the returned stream
  • 2c73a1f: 8290324: Move atomic operations outside of os_xxx.hpp
  • e8975be: 8290746: ProblemList compiler/vectorization/TestAutoVecIntMinMax.java
  • 9c19d89: Merge
  • 17e65bb: 8290625: Test jdk/javadoc/tool/CheckManPageOptions.java after manpage update
  • 618f3a8: 8278274: Update nroff pages in JDK 19 before RC
  • ... and 131 more: https://git.openjdk.org/jdk/compare/393dc7ade716485f4452d0185caf9e630e4c6139...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 12, 2022
scrollPane = null;
return state ? State.createLocked (widget, this) : State.REJECTED;
}
return state ? State.REJECTED : State.REJECTED;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does not look correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that! You are right, this is not correct.

I updated the PR to make the locking more clear:

CustomizablePanAction extends WidgetAction.LockedAdapter which is used for long-term actions like panning/moving. All methods return the locked state if isLocked() is true and rejected otherwise.
The locked state means the event is processed and the processing has to stopped immediately (no other action should processed it).
The rejected state the event is not processed by the action and has to be processed by other actions too.

In our case CustomizablePanAction should be locked when the user presses the mouse inside of the panning area (the graph). And CustomizablePanAction should be unlocked when the mouse button is released again. Leaving the panning area (mouseExited) and entering it again (mouseEntered) should not change the locking state as long as the user does not release the mouse.

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable.

@tobiasholenstein
Copy link
Contributor Author

thanks @vnkozlov and @TobiHartmann for the reviews!

@tobiasholenstein
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jul 21, 2022

Going to push as commit 604a115.
Since your change was applied there have been 142 commits pushed to the master branch:

  • 59e495e: 8290704: x86: TemplateTable::_new should not call eden_allocate() without contiguous allocs enabled
  • 799a2c8: 8276561: URL$DefaultFactory::PREFIX should be static final
  • 52cc6cd: 8288723: Avoid redundant ConcurrentHashMap.get call in java.time
  • 3582fd9: 8290359: Ensure that all directory streams are closed in jdk.link
  • 53fc495: 8290316: Ensure that all directory streams are closed in java.base
  • db1e44c: 8290353: ModuleReader::list specification should suggest closing the returned stream
  • 2c73a1f: 8290324: Move atomic operations outside of os_xxx.hpp
  • e8975be: 8290746: ProblemList compiler/vectorization/TestAutoVecIntMinMax.java
  • 9c19d89: Merge
  • 17e65bb: 8290625: Test jdk/javadoc/tool/CheckManPageOptions.java after manpage update
  • ... and 132 more: https://git.openjdk.org/jdk/compare/393dc7ade716485f4452d0185caf9e630e4c6139...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 21, 2022
@openjdk openjdk bot closed this Jul 21, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jul 21, 2022
@openjdk
Copy link

openjdk bot commented Jul 21, 2022

@tobiasholenstein Pushed as commit 604a115.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
3 participants