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

Non-resizable (readonly) component becomes resizable after window resize #331

Closed
aquirier opened this issue Feb 18, 2016 · 6 comments
Closed

Comments

@aquirier
Copy link

  1. Init gridstack component with jquery UI option resizable: { disabled: true }. Do not explicitly specify 'data-gs-no-resize' attribute for widgets
  2. Make sure widgets are not resizable
  3. Resize the size of your browser so that the width of the window is less than 768px so the component is shown in mobile phone size
  4. Go the size of the browser back to full screen
    => Now user can change the size of widgets by dragging and dropping from low-right corner of a widget
    Expected: The user should not be allowed to resize the widget in read-only mode

P.S. Specifying 'data-gs-no-resize' attribute for widgets seems to be a temporary workaround for readonly mode but the bug should be fixed in a normal way.

@radiolips
Copy link
Member

Have you tried using the option staticGrid: true? Or, for your problem, do you want to allow moving and only disable resize?

@aquirier
Copy link
Author

Hi, 'staticGrid' option is good solution in my case, thanks for the info, i'll try it! But I hope, my previous post is also helpful to make the component better. Thank you!

@radiolips radiolips added this to the v0.2.5 milestone Feb 18, 2016
@radiolips
Copy link
Member

Absolutely. Thanks for the feedback - we'll incorporate a fix for this in v0.2.5.

@radiolips radiolips reopened this Feb 18, 2016
@aquirier
Copy link
Author

Unfortunately, staticGrid: true option doesn't work for me.
I use last stable release version 0.2.4 + knockout.js.

@radiolips
Copy link
Member

@aquirier for the latest stable version, you'll want static_grid. In version 0.2.5, gridstack is moving away from underscores in variable names, to follow better Javascript convention.

@radiolips
Copy link
Member

Changing this to enhancement. Will add a new option for disabling resizable and draggable separately, without interfering with jquery-ui options. Fixes the problem and allows for new functionality (only drag or only resize).

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

No branches or pull requests

2 participants