forked from public/foundryvtt-reve-de-dragon
Fix livre
This commit is contained in:
@ -24,10 +24,10 @@ export class RdDTMRDialog extends Dialog {
|
||||
let dialogOptions = { classes: [ "tmrdialog"] }
|
||||
|
||||
dialogConf.title = "Terres Médianes de Rêve",
|
||||
dialogOptions.width = 600;
|
||||
dialogOptions.height = 360;
|
||||
dialogOptions.width = 740;
|
||||
dialogOptions.height = 960;
|
||||
super(dialogConf, dialogOptions);
|
||||
|
||||
|
||||
this.sort = sort;
|
||||
this.actor = actor;
|
||||
}
|
||||
@ -38,8 +38,22 @@ export class RdDTMRDialog extends Dialog {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
loadImage(url) {
|
||||
return new Promise(r => { let i = new Image(); i.onload = (() => r(i)); i.src = url; });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async init_canvas() {
|
||||
var ctx = document.getElementById('canvas_tmr');
|
||||
ctx = ctx.getContext('2d');
|
||||
let img = await this.loadImage("systems/foundryvtt-reve-de-dragon/styles/ui/tmp_main_r1.webp");
|
||||
await ctx.drawImage(img, 0, 0, 720, 860);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
|
||||
this.init_canvas();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user