Changed token cache pixel ratio to use canvas ratio
This commit is contained in:
parent
cc7db42894
commit
4adc6015f1
@ -183,6 +183,9 @@ function MapToken({
|
||||
const imageRef = useRef();
|
||||
useEffect(() => {
|
||||
const image = imageRef.current;
|
||||
const canvas = image.getCanvas();
|
||||
const pixelRatio = canvas.pixelRatio || 1;
|
||||
|
||||
if (
|
||||
image &&
|
||||
tokenSourceStatus === "loaded" &&
|
||||
@ -190,7 +193,7 @@ function MapToken({
|
||||
tokenHeight > 0
|
||||
) {
|
||||
image.cache({
|
||||
pixelRatio: debouncedStageScale * window.devicePixelRatio,
|
||||
pixelRatio: debouncedStageScale * pixelRatio,
|
||||
});
|
||||
image.drawHitFromCache();
|
||||
// Force redraw
|
||||
|
Loading…
x
Reference in New Issue
Block a user