Skip to content

Commit

Permalink
fix(cursor): reset the cursor instead of changing it to auto
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Lewis committed Dec 11, 2016
1 parent 5768b59 commit 514851f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/resizable.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const getResizeCursor: Function = (edges: Edges): string => {
} else if (edges.top || edges.bottom) {
return 'ns-resize';
} else {
return 'auto';
return null;
}
};

Expand Down Expand Up @@ -317,7 +317,7 @@ export class Resizable implements OnInit, OnDestroy, AfterViewInit {
}

const resizeEdges: Edges = getResizeEdges({mouseX, mouseY, elm: this.elm, allowedEdges: this.resizeEdges});
const cursor: string = currentResize ? 'auto' : getResizeCursor(resizeEdges);
const cursor: string = currentResize ? null : getResizeCursor(resizeEdges);
this.renderer.setElementStyle(this.elm.nativeElement, 'cursor', cursor);

});
Expand Down
2 changes: 1 addition & 1 deletion test/resizable.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('resizable directive', () => {
clientX: 150,
clientY: 197
},
cursor: 'auto'
cursor: ''
}];
});

Expand Down

0 comments on commit 514851f

Please sign in to comment.