Skip to content

Commit ed0737a

Browse files
committed
Added applying width and height when aspectRatio is set
1 parent 5514964 commit ed0737a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/angular2-draggable/src/lib/angular-resizable.directive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,10 @@ export class AngularResizableDirective implements OnInit, OnChanges, OnDestroy,
405405

406406
private doResize() {
407407
const container = this.el.nativeElement;
408-
if (this._direction.n || this._direction.s) {
408+
if (this._direction.n || this._direction.s || this._aspectRatio) {
409409
this.renderer.setStyle(container, 'height', this._currSize.height + 'px');
410410
}
411-
if (this._direction.w || this._direction.e) {
411+
if (this._direction.w || this._direction.e || this._aspectRatio) {
412412
this.renderer.setStyle(container, 'width', this._currSize.width + 'px');
413413
}
414414
this.renderer.setStyle(container, 'left', this._currPos.x + 'px');

0 commit comments

Comments
 (0)