Skip to content

[Feature]: Open Shelf at Cursor Position #14

Merged
GameGodS3 merged 2 commits intoGameGodS3:mainfrom
AJAYK-01:window-position-fix
Oct 3, 2021
Merged

[Feature]: Open Shelf at Cursor Position #14
GameGodS3 merged 2 commits intoGameGodS3:mainfrom
AJAYK-01:window-position-fix

Conversation

@AJAYK-01
Copy link
Contributor

@AJAYK-01 AJAYK-01 commented Oct 3, 2021

Context

DropPoint currently opens new instances of the shelf on the top middle of screen.
This PR changes the position of a new instance to be near the current cursor position for better UX while trying to drag files into it.

Description of the Change

  • Changed the default window positions x and y coordinate in Window.js to follow the cursor position.
  • The coordinates are in such a way that as the shelf opens the cursor will be at the bottom left of the shelf.
  • Since Windows and Linux can open a window out of the bounds of the physical display, added a conditional check to detect if the shelf opens beyond the screen and make the necessary correction to the coordinates.

Demo

droppointpr mov

Possible Drawbacks

Nil

Verification Process

Tested on MacOs and Windows, and verified that the application and the new change works as intended.

Release Notes

DropPoint Shelf now opens at cursor position

@GameGodS3
Copy link
Owner

Awesome! 🤩❤
Thank You

@GameGodS3 GameGodS3 merged commit e2da2d8 into GameGodS3:main Oct 3, 2021
@GameGodS3 GameGodS3 added enhancement New feature or request hacktoberfest-accepted Your PR is valid and has been qualified for hacktoberfest labels Oct 3, 2021
@AJAYK-01 AJAYK-01 deleted the window-position-fix branch October 3, 2021 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request hacktoberfest-accepted Your PR is valid and has been qualified for hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants