Commit 8b7970f4 authored by Alex Beregszaszi's avatar Alex Beregszaszi

Remove dependency on divs in editor

parent 15b4cbef
......@@ -487,7 +487,7 @@ var run = function () {
// ----------------- editor resize ---------------
function onResize () {
editor.resize()
editor.resize(document.querySelector('#editorWrap').checked)
reAdjust()
}
window.onresize = onResize
......
......@@ -95,10 +95,10 @@ function Editor () {
}
}
this.resize = function () {
this.resize = function (useWrapMode) {
editor.resize()
var session = editor.getSession()
session.setUseWrapMode(document.querySelector('#editorWrap').checked)
session.setUseWrapMode(useWrapMode)
if (session.getUseWrapMode()) {
var characterWidth = editor.renderer.characterWidth
var contentWidth = editor.container.ownerDocument.getElementsByClassName('ace_scroller')[0].clientWidth
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment