From 10c44640e317470d3d417269f9774b0fd8f1aa2f Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Tue, 25 Jan 2011 19:39:52 +0800 Subject: [PATCH 1/2] Allowing textmate like highlighting of right margin & indicator. Changed twilight style to demo this. --- lib/ace/css/editor.css | 24 +++++++++++++++++------- lib/ace/theme/twilight.js | 5 +++-- lib/ace/virtual_renderer.js | 11 ++++++++--- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/lib/ace/css/editor.css b/lib/ace/css/editor.css index cd537ddd..adfa1511 100644 --- a/lib/ace/css/editor.css +++ b/lib/ace/css/editor.css @@ -32,13 +32,23 @@ left: 0px; } +.ace_editor .ace_print_margin_layer { + z-index: 0; + position: absolute; + overflow: hidden; + margin: 0px; + left: 0px; + height: 100%; + width: 100%; +} + .ace_editor .ace_print_margin { position: absolute; height: 100%; } .ace_layer { - z-index: 0; + z-index: 1; position: absolute; overflow: hidden; white-space: nowrap; @@ -56,7 +66,7 @@ } .ace_cursor { - z-index: 3; + z-index: 4; position: absolute; } @@ -69,20 +79,20 @@ .ace_marker-layer .ace_step { position: absolute; - z-index: 2; + z-index: 3; } .ace_marker-layer .ace_selection { position: absolute; - z-index: 3; + z-index: 4; } .ace_marker-layer .ace_bracket { position: absolute; - z-index: 4; + z-index: 5; } .ace_marker-layer .ace_active_line { position: absolute; - z-index: 1; -} \ No newline at end of file + z-index: 2; +} diff --git a/lib/ace/theme/twilight.js b/lib/ace/theme/twilight.js index 4d27f963..36fb8953 100644 --- a/lib/ace/theme/twilight.js +++ b/lib/ace/theme/twilight.js @@ -64,8 +64,9 @@ define(function(require, exports, module) { }\ \ .ace-twilight .ace_print_margin {\ - width: 1px;\ - background: #e8e8e8;\ + border-left: 1px solid #3C3C3C;\ + width: 100%;\ + background: #242424;\ }\ \ .ace-twilight .ace_scroller {\ diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js index 687085fa..e52cd2c0 100644 --- a/lib/ace/virtual_renderer.js +++ b/lib/ace/virtual_renderer.js @@ -20,6 +20,7 @@ * * Contributor(s): * Fabian Jakobs + * Irakli Gozalishvili (http://jeditoolkit.com) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or @@ -265,13 +266,17 @@ var VirtualRenderer = function(container, theme) { } this.$updatePrintMargin = function() { + var containerEl + if (!this.$showPrintMargin && !this.$printMarginEl) return; - if (!this.$printMarginEl) { - this.$printMarginEl = document.createElement("div"); - this.content.insertBefore(this.$printMarginEl, this.$textLayer.element); + containerEl = document.createElement("div"); + containerEl.className = "ace_print_margin_layer"; + this.$printMarginEl = document.createElement("div") this.$printMarginEl.className = "ace_print_margin"; + containerEl.appendChild(this.$printMarginEl); + this.content.insertBefore(containerEl, this.$textLayer.element); } var style = this.$printMarginEl.style; From 681dace8ce33e6b0177ce850b1540315097afd61 Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Tue, 25 Jan 2011 23:00:01 +0800 Subject: [PATCH 2/2] Removing unnecessary and dependency on heavy 'node-o3-xml'. --- .gitmodules | 3 --- support/node-o3-xml | 1 - 2 files changed, 4 deletions(-) delete mode 160000 support/node-o3-xml diff --git a/.gitmodules b/.gitmodules index aee8d549..6074430c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "support/node-o3-xml"] - path = support/node-o3-xml - url = git://github.com/ajaxorg/node-o3-xml.git [submodule "support/cockpit"] path = support/cockpit url = git://github.com/ajaxorg/cockpit.git diff --git a/support/node-o3-xml b/support/node-o3-xml deleted file mode 160000 index 563a2b10..00000000 --- a/support/node-o3-xml +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 563a2b1091bd1b9a7d26a9f597aacb4341edb619