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

ngResizable Locks Height When rzHandles Includes Only e, w #116

Closed
Yamazaki93 opened this issue Oct 27, 2018 · 1 comment · Fixed by #118
Closed

ngResizable Locks Height When rzHandles Includes Only e, w #116

Yamazaki93 opened this issue Oct 27, 2018 · 1 comment · Fixed by #118

Comments

@Yamazaki93
Copy link
Contributor

Hi,
Great plugin first of all! Don't know if this is by design, but ngResizable locks the height of the element when the handles only include either 'e' or 'w'. The following roughly illustrate the problem

<div style="position:relative">
  <div ngResizable rzHandles="e" style="height: 100%;">
    <!--Before drag: This div's height match the parent regardless of parent size-->
    <!--After dragging the right handle: This div height is set to the height at the time of dragging. This issue shows up after the parent div resizes for any reason. The height cannot be changed since there's no handle on n or s side-->
  </div>
</div>

Took a brief look at angular-resizable.directive.ts, it seems doResize hard set the height and width regardless of the handles. Maybe doResize can check _direction before setting the container size?
Similar problem on width could happen if the handle only includes either s, n

@xieziyu
Copy link
Owner

xieziyu commented Oct 29, 2018

@Yamazaki93
Thank you. I will review your PR.

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

Successfully merging a pull request may close this issue.

2 participants