Autoformat

This commit is contained in:
Vincent Vandemeulebrouck
2022-01-01 14:01:41 +01:00
parent 25420cb481
commit bb1d03c8a4
6 changed files with 24 additions and 23 deletions

View File

@ -8,24 +8,24 @@ import { HtmlUtility } from "./html-utility.js";
import { Misc } from "./misc.js";
import { RdDSheetUtility } from "./rdd-sheet-utility.js";
/* -------------------------------------------- */
/* -------------------------------------------- */
export class RdDActorVehiculeSheet extends ActorSheet {
/** @override */
static get defaultOptions() {
static get defaultOptions() {
RdDUtility.initAfficheContenu();
return mergeObject(super.defaultOptions, {
classes: ["rdd", "sheet", "actor"],
template: "systems/foundryvtt-reve-de-dragon/templates/actor-vehicule-sheet.html",
return mergeObject(super.defaultOptions, {
classes: ["rdd", "sheet", "actor"],
template: "systems/foundryvtt-reve-de-dragon/templates/actor-vehicule-sheet.html",
width: 640,
height: 720,
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac"}],
dragDrop: [{dragSelector: ".item-list .item", dropSelector: null}]
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }]
});
}
/* -------------------------------------------- */
/* -------------------------------------------- */
_checkNull(items) {
if (items && items.length) {
return items;
@ -67,10 +67,10 @@ export class RdDActorVehiculeSheet extends ActorSheet {
return formData;
}
/* -------------------------------------------- */
async _onDropItem(event, dragData) {
const destItemId = RdDSheetUtility.getItemId(event);
const destItemId = $(event.target)?.closest('.item').attr('data-item-id');
const dropParams = RdDSheetUtility.prepareItemDropParameters(destItemId, this.actor.id, dragData, this.objetVersConteneur);
const callSuper = await this.actor.processDropItem(dropParams);
if (callSuper) {
@ -94,7 +94,7 @@ export class RdDActorVehiculeSheet extends ActorSheet {
/* -------------------------------------------- */
/** @override */
activateListeners(html) {
activateListeners(html) {
super.activateListeners(html);
HtmlUtility._showControlWhen($(".gm-only"), game.user.isGM);
@ -114,7 +114,7 @@ export class RdDActorVehiculeSheet extends ActorSheet {
});
html.find('.creer-un-objet').click(async event => {
RdDUtility.selectObjetType( this );
RdDUtility.selectObjetType(this);
});
html.find('#nettoyer-conteneurs').click(async event => {
this.actor.nettoyerConteneurs();
@ -134,7 +134,7 @@ export class RdDActorVehiculeSheet extends ActorSheet {
});
}
/* -------------------------------------------- */
/** @override */
setPosition(options = {}) {