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

Dragging a piece outside window creates horizontal bars #220

Open
ajax333221 opened this issue May 17, 2021 · 0 comments
Open

Dragging a piece outside window creates horizontal bars #220

ajax333221 opened this issue May 17, 2021 · 0 comments

Comments

@ajax333221
Copy link

The document.body offsets should be limits: 1) top, 2) left, 3) left +$(document.body).innerWidth(), 4) top + $(document.body).innerHeight().

Something like I did in here: https://github.com/ajax333221/isepic-chess-ui/blob/e5c02bc7cbc1aa259cc84aa07a52cf985e4e5ebb/js/isepic-chess-ui.js#L133

With and some safty checks the piece could stop trying to go beyond this limits and the scroll bars should not appear.

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

No branches or pull requests

1 participant