Properly reset the size of layers on resize

Otherwise, when a theme has padding in the scroll-view, it will be 
scrollable all the time (width:100%).
This commit is contained in:
Ben Ogle
2013-11-05 18:39:11 -08:00
parent 994756f8c1
commit 0aa0dc01d5
2 changed files with 2 additions and 7 deletions

View File

@@ -774,6 +774,7 @@ class Editor extends View
@setHeightInLines()
@setWidthInChars()
@requestDisplayUpdate()
@updateLayerDimensions()
@focus() if @isFocused
if pane = @getPane()
@@ -1155,7 +1156,7 @@ class Editor extends View
@verticalScrollbarContent.height(@layerHeight)
@scrollBottom(height) if @scrollBottom() > height
minWidth = @charWidth * @getMaxScreenLineLength() + 20
minWidth = @scrollView.width()
unless @layerMinWidth == minWidth
@renderedLines.css('min-width', minWidth)
@underlayer.css('min-width', minWidth)

View File

@@ -101,12 +101,6 @@
overflow-x: hidden;
}
.editor .underlayer,
.editor .lines,
.editor .overlayer {
width: 100%;
}
.editor .underlayer {
z-index: 0;
position: absolute;