SACCO45GNBBHHTWCVMKJ64ZLGW32DM4DIKSOJF3N6U47WP4JY5HAC
PZOXTKMY2XASMYOY4VIGP3IEBPO55A4RU4FBZDVRRNTQA32F25ZQC
ORL7JM3TMSACSMHU6GXYKRUJS6YKHHFKXLZM3NMYQ7CGKYSPN3VAC
3UFL673QX2JG7KHTAM7DFH4BBYVHDNMXBS2RW45G3JBNFZFLSRRQC
CWCOGTXQXEQPK6O4TQFCIPDVMZD7WHOBGMIG2DTSO6BEBFEADZIQC
2OZGXOFLTXALS34QEIQ2F6VT7AUWYK7FVXUUDX66GZT5I7FUNPVAC
YLV4W4IIJEWLS72UPGXZAJCDTWN6SJ4UTCYOW7YDSK2DLOUTAFOAC
this.container.hitArea = new Pixi.Rectangle( // note: hitarea breaks child onhover: https://github.com/pixijs/pixi.js/issues/5837
- RenderedChunkConstants.NODE_HITAREA_PX / 2,
- RenderedChunkConstants.NODE_HITAREA_PX / 2,
RenderedChunkConstants.NODE_HITAREA_PX,
RenderedChunkConstants.NODE_HITAREA_PX,
);
// this.container.hitArea = new Pixi.Rectangle( // note: hitarea breaks child onhover: https://github.com/pixijs/pixi.js/issues/5837
// - RenderedChunkConstants.NODE_HITAREA_PX / 2,
// - RenderedChunkConstants.NODE_HITAREA_PX / 2,
// RenderedChunkConstants.NODE_HITAREA_PX,
// RenderedChunkConstants.NODE_HITAREA_PX,
// );
// this.container.hitArea = new Pixi.Rectangle(
// - RenderedChunkConstants.NODE_HITAREA_PX / 2,
// - RenderedChunkConstants.NODE_HITAREA_PX / 2,
// RenderedChunkConstants.NODE_HITAREA_PX,
// RenderedChunkConstants.NODE_HITAREA_PX,
// );
// this.hitAreaDrawn = new Pixi.Graphics();
// this.hitAreaDrawn.beginFill(0xffffff);
// this.hitAreaDrawn.drawRect(
// - RenderedChunkConstants.NODE_HITAREA_PX / 2,
// - RenderedChunkConstants.NODE_HITAREA_PX / 2,
// RenderedChunkConstants.NODE_HITAREA_PX,
// RenderedChunkConstants.NODE_HITAREA_PX,
// );
// this.container.addChild(this.hitAreaDrawn);
this.tooltipContainer = null;
if (this.state.isActive) {
if (this.tooltipContainer === null) {
// if doesnt exist, construct it
this.tooltipContainer = new Pixi.Container();
const box = new Pixi.Graphics();
box.lineStyle(2, 0xeeeeee, 1);
box.beginFill(0x222222);
box.drawRoundedRect(0, 0, 40, 40, 4);
this.tooltipContainer.addChild(box)
this.container.addChild(this.tooltipContainer);
}
} else {
if (this.tooltipContainer) {
// remove it
this.container.removeChild(this.tooltipContainer);
this.tooltipContainer.destroy();
this.tooltipContainer = null;
}
}