change mouse cursor when over a selection
Change mouse cursor to a pointer when hovered over a selection
This commit is contained in:
parent
8416cfb42a
commit
b5a1aaebba
1 changed files with 12 additions and 0 deletions
|
|
@ -88,6 +88,18 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.content = dom.createElement("div");
|
this.content = dom.createElement("div");
|
||||||
this.content.className = "ace_content";
|
this.content.className = "ace_content";
|
||||||
|
|
||||||
|
this.content.addEventListener('mousemove', function(e){
|
||||||
|
var char = _self.pixelToScreenCoordinates(e.pageX, e.pageY);
|
||||||
|
var range = _self.session.selection.getRange();
|
||||||
|
|
||||||
|
if( !range.isEmpty() && range.contains(char.row, char.column) ){
|
||||||
|
_self.content.style.cursor = "default";
|
||||||
|
}else{
|
||||||
|
_self.content.style.cursor = "text";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.scroller.appendChild(this.content);
|
this.scroller.appendChild(this.content);
|
||||||
|
|
||||||
this.$gutterLayer = new GutterLayer(this.$gutter);
|
this.$gutterLayer = new GutterLayer(this.$gutter);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue