From 99ad78d13c3654a89fadcf0189f7facd04234793 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Apr 2010 14:37:45 +0200 Subject: [PATCH] * Changed css class setting * Added max 0 for height --- src/ScrollBar.js | 2 +- src/VirtualRenderer.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ScrollBar.js b/src/ScrollBar.js index 4f99abef..c1615ea5 100644 --- a/src/ScrollBar.js +++ b/src/ScrollBar.js @@ -28,7 +28,7 @@ ace.ScrollBar.prototype.getWidth = function() { }; ace.ScrollBar.prototype.setHeight = function(height) { - this.element.style.height = (height - this.width) + "px"; + this.element.style.height = Math.max(0, height - this.width) + "px"; }; ace.ScrollBar.prototype.setInnerHeight = function(height) { diff --git a/src/VirtualRenderer.js b/src/VirtualRenderer.js index ee3ed56b..5f1cb1ca 100644 --- a/src/VirtualRenderer.js +++ b/src/VirtualRenderer.js @@ -2,7 +2,7 @@ ace.provide("ace.VirtualRenderer"); ace.VirtualRenderer = function(container) { this.container = container; - this.container.className += "editor"; + this.container.className += " editor"; this.scroller = document.createElement("div"); this.scroller.className = "scroller"; @@ -233,11 +233,11 @@ ace.VirtualRenderer.prototype.screenToTextCoordinates = function(pageX, pageY) { }; ace.VirtualRenderer.prototype.visualizeFocus = function() { - this.container.className = "editor focus"; + //this.container.className = "editor focus"; }; ace.VirtualRenderer.prototype.visualizeBlur = function() { - this.container.className = "editor"; + //this.container.className = "editor"; }; ace.VirtualRenderer.prototype.showComposition = function(position) {