allow to customize cursor appearance
This commit is contained in:
parent
8daf190b2e
commit
aa472742cc
1 changed files with 11 additions and 5 deletions
|
|
@ -195,11 +195,15 @@ var Cursor = function(parentEl) {
|
|||
}
|
||||
|
||||
var style = (this.cursors[cursorIndex++] || this.addCursor()).style;
|
||||
|
||||
style.left = pixelPos.left + "px";
|
||||
style.top = pixelPos.top + "px";
|
||||
style.width = config.characterWidth + "px";
|
||||
style.height = config.lineHeight + "px";
|
||||
|
||||
if (!this.drawCursor) {
|
||||
style.left = pixelPos.left + "px";
|
||||
style.top = pixelPos.top + "px";
|
||||
style.width = config.characterWidth + "px";
|
||||
style.height = config.lineHeight + "px";
|
||||
} else {
|
||||
this.drawCursor(style, pixelPos, config, selections[i], this.session);
|
||||
}
|
||||
}
|
||||
while (this.cursors.length > cursorIndex)
|
||||
this.removeCursor();
|
||||
|
|
@ -211,6 +215,8 @@ var Cursor = function(parentEl) {
|
|||
this.$pixelPos = pixelPos;
|
||||
this.restartTimer();
|
||||
};
|
||||
|
||||
this.drawCursor = null;
|
||||
|
||||
this.$setOverwrite = function(overwrite) {
|
||||
if (overwrite != this.overwrite) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue