forked from public/foundryvtt-reve-de-dragon
Fix: tooltips sorts TMRs
This commit is contained in:
@ -86,15 +86,13 @@ export class Draconique {
|
||||
* @param {*} pixiTMR instance de PixiTMR qui gère les tooltips, les méthodes de création de sprite standard, les clicks.
|
||||
*/
|
||||
token(pixiTMR, linkData, coordTMR, type = undefined) {
|
||||
const tooltip = this.tooltip(linkData);
|
||||
const token = {
|
||||
sprite: this.createSprite(pixiTMR),
|
||||
coordTMR: coordTMR
|
||||
coordTMR: coordTMR,
|
||||
tooltip: tooltip
|
||||
};
|
||||
token[type ?? this.code()] = linkData;
|
||||
this.linkData = linkData;
|
||||
if (this.tooltip(linkData)) {
|
||||
pixiTMR.addTooltip(token.sprite, (e, s) => this.computeTooltip(e, s));
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user