change mouse cursor when over selection
moved to mouse handler. don't change when dragging or selecting.
This commit is contained in:
parent
449226dac9
commit
23680b4f7e
2 changed files with 15 additions and 0 deletions
|
|
@ -50,6 +50,10 @@
|
|||
cursor: text !important;
|
||||
}
|
||||
|
||||
.ace_selection .ace_content {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.ace_gutter {
|
||||
position: absolute;
|
||||
overflow : hidden;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,17 @@ var MouseHandler = function(editor) {
|
|||
editor.focus();
|
||||
return event.preventDefault(e);
|
||||
});
|
||||
|
||||
editor.on('mousemove', function(e){
|
||||
var char = editor.renderer.pixelToScreenCoordinates(e.x, e.y);
|
||||
var range = editor.session.selection.getRange();
|
||||
|
||||
if( !range.isEmpty() && range.contains(char.row, char.column) ){
|
||||
editor.setStyle("ace_selection");
|
||||
}else{
|
||||
editor.unsetStyle("ace_selection");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue