Skip to content

Commit

Permalink
Remove dependency on divs in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Mar 9, 2017
1 parent 15b4cbe commit 8b7970f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ var run = function () {
// ----------------- editor resize ---------------

function onResize () {
editor.resize()
editor.resize(document.querySelector('#editorWrap').checked)
reAdjust()
}
window.onresize = onResize
Expand Down
4 changes: 2 additions & 2 deletions src/app/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b7970f

Please sign in to comment.