Skip to content

Commit

Permalink
fix: dont change the cursor when resizing an element
Browse files Browse the repository at this point in the history
Closes #24
  • Loading branch information
Matt Lewis committed Nov 3, 2016
1 parent a46fcbd commit 697c52c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/resizable.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export class Resizable implements OnInit, AfterViewInit {
}

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

});
Expand Down Expand Up @@ -440,6 +440,7 @@ export class Resizable implements OnInit, AfterViewInit {
this.renderer.setElementStyle(currentResize.clonedNode, 'position', 'fixed');
this.renderer.setElementStyle(currentResize.clonedNode, 'left', `${currentResize.startingRect.left}px`);
this.renderer.setElementStyle(currentResize.clonedNode, 'top', `${currentResize.startingRect.top}px`);
this.renderer.setElementStyle(currentResize.clonedNode, 'cursor', 'auto');
}
this.resizeStart.emit({
edges: getEdgesDiff({edges, initialRectangle: startingRect, newRectangle: startingRect}),
Expand Down

0 comments on commit 697c52c

Please sign in to comment.