question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow controlled resizing

See original GitHub issue

Currently re-resizable exclusively owns the width/height during a resize. It would be powerful to make this controllable, so that users can implement (for instance) their own sizing (snapping, clamping, etc.) logic.

(As a hack for now, one can override the calculateNewSize method to always return auto, and then explicitly control the size of a grand-child div from the onResize callback.)

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
JoshuaCWebDevelopercommented, Feb 13, 2019

It wasn’t immediately clear to me from reading this ticket, so I just wanted to clarify that this functionality does appear to be currently implemented in the latest version (using the size property and the resize handlers).

1reaction
mdankacommented, Jul 20, 2018

This is also a problem when using a scale transform.

For example, with a scale of 2: reresizable

An example implementation of this is how react-draggable exposes a DraggableCore element which truly doesn’t manage any state, even while dragging: https://github.com/mzabriskie/react-draggable

As a workaround, you can use the “deprecated” updateSize method on the resizable instance to override the default sizing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make controls stretch, shrink, or move as you resize a form
To stop a control from stretching, shrinking, or moving as you resize a form, set the control's anchoring option back to the default...
Read more >
Allow the User to Resize Controls at Runtime - CodeProject
Enable resizing of controls on a form at runtime with this class and two lines of code.
Read more >
Resizing constraints - Sketch
The layer's behavior can be further controlled using resizing constraints applied directly to it.
Read more >
resize - CSS: Cascading Style Sheets - MDN Web Docs - Mozilla
none. The element offers no user-controllable method for resizing it. ; both. The element displays a mechanism for allowing the user to resize...
Read more >
Moving and Resizing Controls at Run Time - ThoughtCo
Firstly, drop several controls on a form. Have a CheckBox to enable or disable moving and resizing controls at run-time. Next, define three ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found