Skip to content

Commit

Permalink
feat(cssClasses): Gives classes to main element depend on state
Browse files Browse the repository at this point in the history
  • Loading branch information
vkaestle committed Feb 28, 2017
1 parent 3ce508d commit 8e3f108
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/resizable.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ export class Resizable implements OnInit, OnDestroy, AfterViewInit {
const resizeCursors: ResizeCursors = Object.assign({}, DEFAULT_RESIZE_CURSORS, this.resizeCursors);
const cursor: string = currentResize ? null : getResizeCursor(resizeEdges, resizeCursors);
this.renderer.setElementStyle(this.elm.nativeElement, 'cursor', cursor);
this.renderer.setElementClass(this.elm.nativeElement, 'resize-hover', (cursor !== null));
this.renderer.setElementClass(this.elm.nativeElement, 'resize-active', (currentResize !== null));
this.renderer.setElementClass(this.elm.nativeElement, 'resize-left', (resizeEdges.left === true));
this.renderer.setElementClass(this.elm.nativeElement, 'resize-right', (resizeEdges.right === true));
this.renderer.setElementClass(this.elm.nativeElement, 'resize-top', (resizeEdges.top === true));
this.renderer.setElementClass(this.elm.nativeElement, 'resize-bottom', (resizeEdges.bottom === true));

});

Expand Down

0 comments on commit 8e3f108

Please sign in to comment.