From f78fbc6e3656bdf84cdf526d9f75ebdc89ceab6d Mon Sep 17 00:00:00 2001
From: nightwing
Date: Thu, 10 Jan 2013 13:36:21 +0400
Subject: [PATCH 1/5] do not set font size on editor, to not create weird
combinations of inherited line height and own font size
---
lib/ace/css/editor.css | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/ace/css/editor.css b/lib/ace/css/editor.css
index 73702bdf..934b6905 100644
--- a/lib/ace/css/editor.css
+++ b/lib/ace/css/editor.css
@@ -2,7 +2,6 @@
position: absolute;
overflow: hidden;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
- font-size: 12px;
}
.ace_scroller {
From 19c3031abf2ff02d0ebf05ee587792180991fd19 Mon Sep 17 00:00:00 2001
From: nightwing
Date: Thu, 10 Jan 2013 13:39:34 +0400
Subject: [PATCH 2/5] change default editor position to relative
---
lib/ace/css/editor.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ace/css/editor.css b/lib/ace/css/editor.css
index 934b6905..c4b40a4f 100644
--- a/lib/ace/css/editor.css
+++ b/lib/ace/css/editor.css
@@ -1,5 +1,5 @@
.ace_editor {
- position: absolute;
+ position: relative;
overflow: hidden;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}
From be642d2a6f71b5944a2ad09db5e081c6732634a3 Mon Sep 17 00:00:00 2001
From: nightwing
Date: Thu, 10 Jan 2013 21:54:59 +0400
Subject: [PATCH 3/5] do not set editor size to 0 when it is hidden
---
lib/ace/virtual_renderer.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/ace/virtual_renderer.js b/lib/ace/virtual_renderer.js
index 8f169def..24d4bd06 100644
--- a/lib/ace/virtual_renderer.js
+++ b/lib/ace/virtual_renderer.js
@@ -300,10 +300,10 @@ var VirtualRenderer = function(container, theme) {
this.resizing++;
else
this.resizing = force ? 1 : 0;
-
if (!height)
height = dom.getInnerHeight(this.container);
- if (force || size.height != height) {
+
+ if (height && (force || size.height != height)) {
size.height = height;
this.scroller.style.height = height + "px";
@@ -318,7 +318,8 @@ var VirtualRenderer = function(container, theme) {
if (!width)
width = dom.getInnerWidth(this.container);
- if (force || this.resizing > 1 || size.width != width) {
+
+ if (width && (force || this.resizing > 1 || size.width != width)) {
size.width = width;
var gutterWidth = this.showGutter ? this.$gutter.offsetWidth : 0;
From 6d7f6de6df6264d123611309738a53080d19f4e6 Mon Sep 17 00:00:00 2001
From: nightwing
Date: Thu, 10 Jan 2013 15:58:49 +0400
Subject: [PATCH 4/5] fix site
---
doc/site/style.css | 15 ++++-----------
index.html | 13 +++++++------
lib/ace/ext/searchbox.css | 9 ++++-----
lib/ace/ext/searchbox.js | 4 ++--
4 files changed, 17 insertions(+), 24 deletions(-)
diff --git a/doc/site/style.css b/doc/site/style.css
index 79640676..5e16c723 100644
--- a/doc/site/style.css
+++ b/doc/site/style.css
@@ -5,25 +5,18 @@ body {
font-family: Helvetica, Arial;
}
-#embed_ace_wrapper {
- height: 525px;
-}
-.ace_editor_wrapper {
+
+#ace_editor_demo, #embedded_ace_code {
height: 275px;
- position: relative;
border: 1px solid #DDD;
border-radius: 4px;
border-bottom-right-radius: 0px;
margin-top: 5px;
}
-#ace_editor_demo, #embedded_ace_code {
- left: 0px;
- top: 0px;
- bottom: 1px;
- right: 1px;
- background: #fff;
+#embedded_ace_code {
+ height: 525px;
}
h1, h2, h3, h4, h5, h6 {
diff --git a/index.html b/index.html
index 4f8bef91..448dbcdb 100644
--- a/index.html
+++ b/index.html
@@ -6,7 +6,10 @@
-
+
+
@@ -69,7 +72,7 @@
in any web page and JavaScript application. ACE is maintained as the
primary editor for Cloud9 IDE
and is the successor of the Mozilla Skywriter (Bespin) project.
-
+
/**
* In fact, you're looking at ACE right now. Go ahead and play with it!
*
@@ -85,7 +88,6 @@ function add(x, y) {
var addResult = add(3, 2);
console.log(addResult);
Now check out the How-To Guide for instructions on
common operations, such as setting a different language mode or
getting the contents from the editor.
\
From e2b6597029f647bc0af0262581051808a3eacfff Mon Sep 17 00:00:00 2001
From: nightwing
Date: Thu, 10 Jan 2013 16:47:18 +0400
Subject: [PATCH 5/5] remove broken sourcemint integration
---
sourcemint/.gitignore | 2 -
sourcemint/README.md | 63 -----------
sourcemint/dev.js | 47 --------
sourcemint/index.html | 16 ---
sourcemint/kitchen-sink.html | 209 -----------------------------------
sourcemint/package.json | 12 --
6 files changed, 349 deletions(-)
delete mode 100644 sourcemint/.gitignore
delete mode 100644 sourcemint/README.md
delete mode 100644 sourcemint/dev.js
delete mode 100644 sourcemint/index.html
delete mode 100644 sourcemint/kitchen-sink.html
delete mode 100644 sourcemint/package.json
diff --git a/sourcemint/.gitignore b/sourcemint/.gitignore
deleted file mode 100644
index 81ce55f2..00000000
--- a/sourcemint/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/dist/
-/node_modules/
\ No newline at end of file
diff --git a/sourcemint/README.md b/sourcemint/README.md
deleted file mode 100644
index 47e33462..00000000
--- a/sourcemint/README.md
+++ /dev/null
@@ -1,63 +0,0 @@
-Develop & Distribute ACE using the Sourcemint Loader
-====================================================
-
-The [Sourcemint JavaScript Loader](https://github.com/sourcemint/loader-js) is an optimized
-module loader that boots sets of *statically linked* modules from *bundles*. An application may
-load additional bundles by using *dynamic links*.
-
-*Bundles* are generated from the AMD formatted source files on the fly during development (using a server helper)
-and in-batch for production builds. To generate bundles the Sourcemint [RequireJS SDK](https://github.com/sourcemint/sdk-requirejs)
-and [Platform NodeJS](https://github.com/sourcemint/platform-nodejs) projects are used.
-
-
-Development
-===========
-
-**Requirements:**
-
- * [NodeJS](http://nodejs.org/)
-
-**Install:**
-
- git clone git://github.com/ajaxorg/ace.git
- cd ace
- # TMP: Switch to sourcemint branch
- git checkout sourcemint
- cd sourcemint
- npm install
-
-**Start development server:**
-
- node dev
-
-**NOTE:** Modified source files are automatically reloaded on browser refresh so there is no
-need to restart the server during development.
-
-
-Production
-==========
-
-To generate production bundles, use the same setup as for *Development*, then run:
-
- // NOT YET IMPLEMENTED
- node build ../demo/kitchen-sink ./dist
-
-Where `../demo/kitchen-sink` is the path to your ACE bootstrap package which embeds ACE in the page
-or provides an interface for the rest of your application to interact with ACE.
-
-Everything needed for ACE (and your bootstrap package) to run will be written to the `./dist` directory which can be
-used in a production application by serving these static files via a web server. To load the bootstrap file use:
-
-
-
-
-
-
-See `../demo/kitchen-sink` for an example of how to write an ACE bootstrap package.
-
-See [Embedding Ace](https://github.com/ajaxorg/ace) and [Embedding API](https://github.com/ajaxorg/ace/wiki/Embedding---API)
-for more information on how to embed and interact with ACE.
diff --git a/sourcemint/dev.js b/sourcemint/dev.js
deleted file mode 100644
index 5ce51b03..00000000
--- a/sourcemint/dev.js
+++ /dev/null
@@ -1,47 +0,0 @@
-
-var PATH = require("path"),
- FS = require("fs"),
- CONNECT = require("connect"),
- BUNDLER = require("sourcemint-platform-nodejs/lib/bundler");
-
-
-exports.main = function(options) {
-
- var server = CONNECT();
-
- server.use(CONNECT.router(function(app) {
-
- app.get(/^\/loader.js/, CONNECT.static(PATH.dirname(require.resolve("sourcemint-loader-js/loader.js"))));
-
- app.get(/^(?:\/demo\/kitchen-sink)(?:\.js)?(\/.*)?$/, BUNDLER.hoist(PATH.dirname(__dirname) + "/demo/kitchen-sink", {
- distributionBasePath: __dirname + "/dist",
- packageIdHashSeed: "__ACE__",
- bundleLoader: false,
- logger: {
- log: function() {
- console.log.apply(null, arguments);
- }
- }
- }));
-
- app.get(/^\//, function(req, res)
- {
- CONNECT.static(__dirname)(req, res, function()
- {
- res.writeHead(404);
- res.end("Not found!");
- });
- });
- }));
-
- server.listen(options.port, "127.0.0.1");
-
- console.log("ACE development server running at http://127.0.0.1:" + options.port + "/");
-}
-
-if (require.main === module) {
- // TODO: Make configurable via command-line flag.
- exports.main({
- port: 8888
- });
-}
diff --git a/sourcemint/index.html b/sourcemint/index.html
deleted file mode 100644
index b149a1c5..00000000
--- a/sourcemint/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
- Ace Development Server
-
-
-
-