Improve code slightly in a couple of places

This commit is contained in:
Johannes Loher 2021-06-26 11:42:50 +02:00
parent 5b26dbb00a
commit d443b339d8
4 changed files with 29 additions and 30 deletions

View file

@ -41,13 +41,9 @@ export class DS4ItemSheet extends ItemSheet<ItemSheet.Data<DS4Item>> {
/** @override */
setPosition(options: Partial<Application.Position> = {}): Application.Position & { height: number } {
const position = super.setPosition(options);
if ("find" in this.element) {
const sheetBody = this.element.find(".sheet-body");
const bodyHeight = position.height - 192;
sheetBody.css("height", bodyHeight);
} else {
console.log("Failure setting position.");
}
const sheetBody = this.element.find(".sheet-body");
const bodyHeight = position.height - 192;
sheetBody.css("height", bodyHeight);
return position;
}