Revert "add anchor demo"
This reverts commit 5589c44225.
Conflicts:
demo/demo.js
This commit is contained in:
parent
8683abd9af
commit
f3174a29b3
2 changed files with 0 additions and 26 deletions
20
demo/demo.js
20
demo/demo.js
|
|
@ -127,26 +127,6 @@ exports.launch = function(env) {
|
|||
var container = document.getElementById("editor");
|
||||
env.editor = new Editor(new Renderer(container, theme));
|
||||
|
||||
var Anchor = require("ace/anchor").Anchor;
|
||||
var Range = require("ace/range").Range;
|
||||
|
||||
var anchorStart = new Anchor(docs.js, 2, 8);
|
||||
var anchorEnd = new Anchor(docs.js, 2, 13);
|
||||
|
||||
var marker;
|
||||
function updateFloat() {
|
||||
if (marker)
|
||||
env.editor.renderer.removeMarker(marker);
|
||||
var range = Range.fromPoints(
|
||||
anchorStart.getPosition(),
|
||||
anchorEnd.getPosition()
|
||||
);
|
||||
marker = env.editor.renderer.addMarker(range, "cool", "text");
|
||||
};
|
||||
updateFloat();
|
||||
anchorStart.on("change", updateFloat);
|
||||
anchorEnd.on("change", updateFloat);
|
||||
|
||||
var modes = {
|
||||
text: new TextMode(),
|
||||
xml: new XmlMode(),
|
||||
|
|
|
|||
|
|
@ -15,12 +15,6 @@ body {
|
|||
color: white;
|
||||
}
|
||||
|
||||
#editor .cool {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
background: orange;
|
||||
}
|
||||
|
||||
#editor {
|
||||
position: absolute;
|
||||
top: 60px;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue