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

Has anyone else experienced random aspect ratio locks? #169

Open
syonfox opened this issue Sep 27, 2021 · 8 comments
Open

Has anyone else experienced random aspect ratio locks? #169

syonfox opened this issue Sep 27, 2021 · 8 comments
Labels

Comments

@syonfox
Copy link

syonfox commented Sep 27, 2021

Describe the bug
So Im having trouble reproducing so im just wondering if anyone knows what trigers the aspect ratio to lock in a jspanel and what might call it. is there a sound way to detect and unlock the aspect ratio (i know thats hacky but easiest :))

Desktop (please complete the following information):

  • OS: debian
  • Browser chrome
  • Version 92.0.4515.70

Additional context
im using jspanel in a webmap with leaflet jquerey bootstrap and slick grids as well as a bunch of other stuff.

@Flyer53
Copy link
Owner

Flyer53 commented Sep 27, 2021

Hi there,
So far nobody reported an issue with option resizeit in combination with the aspectRatio setting which is off by default anyhow unless you press either the Alt, Ctrl or Shift key when resizing starts.
Since you use a bunch of other scripts as well ... could it be that some other tool includes a resizing feature with an aspect ratio setting?

@syonfox
Copy link
Author

syonfox commented Jun 14, 2022

Hi I just want to note that this popped up again in another project but still unable to determine whats causing it to happen without using ctrl resizes. but the result is similar to this and the root cause may be the cleanup event not being fired after some weird user action.

I messed around with it a bit and may have found some clues.

jspanel_bug_aspect-2022-06-14_15.09.48.1.mp4

@Moltenship
Copy link

Hi, I'm facing the same issue, great explanation by @syonfox.

Is it possible to disable modifier keys at all?

@Flyer53
Copy link
Owner

Flyer53 commented Sep 21, 2023

@Moltenship
Sorry, currently there is no option to disable the modifier keys.

@syonfox
Copy link
Author

syonfox commented Sep 21, 2023

I don't think it is necessarily an issue with modifier keys but rather with the mouseup not triggers when it happens quickly outside the window
Maybe if we listen for both window.losefocuse and window.pointerup we can ensure that the resize operation is stopped correctly

jspanelbug-2023-09-21_02.30.56.mp4

@Flyer53
Copy link
Owner

Flyer53 commented Sep 21, 2023

@syonfox @Moltenship
Via the link below you can download a modified jsPanel version where the resizeit modifier keys can be disabled by adding a parameter modifierKeys: false to the resizeit options:

jsPanel.create({
    resizeit: {
        aspectRatio: 'content',
        modifierKeys: false
    }
});

The setting of resizeit.aspectRatio is still working, only the modifier keys are disabled.

https://alpha.jspanel.de/downloads/jspanel-4.16.1-test.zip

Please let me know whether you still can reproduce the issue using the modified js file, thanks.

PS: Although I can't say for sure I don't think the modifier keys are the problem since they do no more than dynamically setting resizeit.aspectRatio to the required value if pressed.

@Moltenship
Copy link

@Flyer53 Awesome, thanks!

@syonfox
Copy link
Author

syonfox commented Sep 21, 2023

I agre, will take a look. watching the videio again I see that its global since switching between pages in the website the loc bug presisted.

(24s bug present window closed then later new window created and bug still there)

therfore it is somthing in global state no a panel instance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants