xieziyu / angular2-draggable

Angular directive (for version >= 2.x ) that makes the DOM element draggable and resizable
https://xieziyu.github.io/angular2-draggable/
294 stars 103 forks source link

rzMaxHeight not working properly #250

Open stjjelic opened 1 year ago

stjjelic commented 1 year ago

rzMaxHeight does not stop resize on the max height when both rzMaxHeight and rzMaxWidth exist.

The problem is simple to replicate: Lets say we have 1000x1000 container and rzMaxHeight and rzMaxWidth are 1000, and we have div which is 600x500. When we resize that div it should stop when we hit 1000 height, but it just continues until we actually hit 1000 width which in the end makes our div 1200x1000 which is bigger than a container.

Edit: Important note, this happens only if [rzAspectRatio]="true"