allow to customize cursor appearance

This commit is contained in:
nightwing 2014-10-28 21:19:43 +04:00
commit aa472742cc

View file

@ -195,11 +195,15 @@ var Cursor = function(parentEl) {
} }
var style = (this.cursors[cursorIndex++] || this.addCursor()).style; var style = (this.cursors[cursorIndex++] || this.addCursor()).style;
style.left = pixelPos.left + "px"; if (!this.drawCursor) {
style.top = pixelPos.top + "px"; style.left = pixelPos.left + "px";
style.width = config.characterWidth + "px"; style.top = pixelPos.top + "px";
style.height = config.lineHeight + "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) while (this.cursors.length > cursorIndex)
this.removeCursor(); this.removeCursor();
@ -211,6 +215,8 @@ var Cursor = function(parentEl) {
this.$pixelPos = pixelPos; this.$pixelPos = pixelPos;
this.restartTimer(); this.restartTimer();
}; };
this.drawCursor = null;
this.$setOverwrite = function(overwrite) { this.$setOverwrite = function(overwrite) {
if (overwrite != this.overwrite) { if (overwrite != this.overwrite) {