mirror of
https://github.com/RoY7x/worldbuilding.git
synced 2025-07-12 17:32:20 -04:00
Improve Simple Worldbuilding sheet layout and macro syntax
This commit is contained in:
parent
6dbee061d6
commit
d405a18f53
8 changed files with 350 additions and 138 deletions
|
@ -29,18 +29,21 @@ export class SimpleItemSheet extends ItemSheet {
|
|||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/** @override */
|
||||
setPosition(options={}) {
|
||||
const position = super.setPosition(options);
|
||||
const sheetBody = this.element.find(".sheet-body");
|
||||
const bodyHeight = position.height - 192;
|
||||
sheetBody.css("height", bodyHeight);
|
||||
return position;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
/** @override */
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
// Activate tabs
|
||||
let tabs = html.find('.tabs');
|
||||
let initial = this._sheetTab;
|
||||
new Tabs(tabs, {
|
||||
initial: initial,
|
||||
callback: clicked => this._sheetTab = clicked.data("tab")
|
||||
});
|
||||
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue