Support autoHeight and autoWidth settings

This commit is contained in:
Nathan Sobo
2017-03-16 21:39:39 -06:00
committed by Antonio Scandurra
parent 369818b475
commit 88b30bc4dc
2 changed files with 43 additions and 7 deletions

View File

@@ -147,6 +147,15 @@ class TextEditorComponent {
style.contain = 'strict'
}
if (this.measurements) {
if (model.getAutoHeight()) {
style.height = this.getScrollHeight() + 'px'
}
if (model.getAutoWidth()) {
style.width = this.getScrollWidth() + 'px'
}
}
let attributes = null
let className = 'editor'
if (this.focused) {