mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-23 08:27:11 +03:00
run prettier on modified V4.js
This commit is contained in:
parent
5e63619042
commit
e262018e10
@ -32,32 +32,36 @@ CustomElement.create({
|
||||
}
|
||||
},
|
||||
|
||||
_resize: function() {
|
||||
_resize: function () {
|
||||
var minHeight = null;
|
||||
var computedStyles = window.getComputedStyle(this._textarea);
|
||||
|
||||
if (this._textarea.style.minHeight) {
|
||||
minHeight = parseInt(this._textarea.style.minHeight, 10);
|
||||
} else {
|
||||
minHeight = parseInt(computedStyles.minHeight, 10)
|
||||
}
|
||||
if (minHeight === 0) {
|
||||
minHeight = parseInt(computedStyles.height, 10)
|
||||
minHeight = parseInt(computedStyles.minHeight, 10);
|
||||
}
|
||||
|
||||
this._textarea.style.overflowY = 'hidden'
|
||||
this._textarea.style.minHeight = minHeight + 'px'
|
||||
this._textarea.style.transition = 'none'
|
||||
if (minHeight === 0) {
|
||||
minHeight = parseInt(computedStyles.height, 10);
|
||||
}
|
||||
|
||||
this._textarea.style.overflowY = "hidden";
|
||||
this._textarea.style.minHeight = minHeight + "px";
|
||||
this._textarea.style.transition = "none";
|
||||
|
||||
// the browser does not include border widths in `.scrollHeight`, but we
|
||||
// sometimes use `box-sizing: border-box` on these elements so we need to
|
||||
// take it into account when setting the CSS `height`.
|
||||
var borderOffset = 0;
|
||||
if (computedStyles.boxSizing === 'border-box') {
|
||||
borderOffset = parseInt(computedStyles.borderTopWidth, 10) + parseInt(computedStyles.borderBottomWidth, 10);
|
||||
if (computedStyles.boxSizing === "border-box") {
|
||||
borderOffset =
|
||||
parseInt(computedStyles.borderTopWidth, 10) +
|
||||
parseInt(computedStyles.borderBottomWidth, 10);
|
||||
}
|
||||
|
||||
this._textarea.style.height = Math.max(minHeight, this._textarea.scrollHeight + borderOffset) + 'px'
|
||||
}
|
||||
}
|
||||
})
|
||||
this._textarea.style.height =
|
||||
Math.max(minHeight, this._textarea.scrollHeight + borderOffset) + "px";
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user