Fix transformer pixelation on windows
This commit is contained in:
parent
1616d8d2af
commit
7721d1d217
@ -46,8 +46,8 @@ function Transformer({
|
|||||||
|
|
||||||
const transformerRef = useRef<Konva.Transformer>(null);
|
const transformerRef = useRef<Konva.Transformer>(null);
|
||||||
|
|
||||||
const [anchorScale, anchorScaleStatus] = useAnchorImage(192, scaleDark);
|
const [anchorScale, anchorScaleStatus] = useAnchorImage(96, scaleDark);
|
||||||
const [anchorRotate, anchorRotateStatus] = useAnchorImage(192, rotateDark);
|
const [anchorRotate, anchorRotateStatus] = useAnchorImage(96, rotateDark);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (
|
||||||
@ -69,20 +69,20 @@ function Transformer({
|
|||||||
middleLeft.fillPriority("pattern");
|
middleLeft.fillPriority("pattern");
|
||||||
middleLeft.fillPatternImage(anchorScale);
|
middleLeft.fillPatternImage(anchorScale);
|
||||||
middleLeft.strokeEnabled(false);
|
middleLeft.strokeEnabled(false);
|
||||||
middleLeft.fillPatternScaleX(-0.25);
|
middleLeft.fillPatternScaleX(-0.5);
|
||||||
middleLeft.fillPatternScaleY(0.25);
|
middleLeft.fillPatternScaleY(0.5);
|
||||||
|
|
||||||
middleRight.fillPriority("pattern");
|
middleRight.fillPriority("pattern");
|
||||||
middleRight.fillPatternImage(anchorScale);
|
middleRight.fillPatternImage(anchorScale);
|
||||||
middleRight.strokeEnabled(false);
|
middleRight.strokeEnabled(false);
|
||||||
middleRight.fillPatternScaleX(0.25);
|
middleRight.fillPatternScaleX(0.5);
|
||||||
middleRight.fillPatternScaleY(0.25);
|
middleRight.fillPatternScaleY(0.5);
|
||||||
|
|
||||||
rotater.fillPriority("pattern");
|
rotater.fillPriority("pattern");
|
||||||
rotater.fillPatternImage(anchorRotate);
|
rotater.fillPatternImage(anchorRotate);
|
||||||
rotater.strokeEnabled(false);
|
rotater.strokeEnabled(false);
|
||||||
rotater.fillPatternScaleX(0.25);
|
rotater.fillPatternScaleX(0.5);
|
||||||
rotater.fillPatternScaleY(0.25);
|
rotater.fillPatternScaleY(0.5);
|
||||||
|
|
||||||
transformerRef.current.getLayer()?.batchDraw();
|
transformerRef.current.getLayer()?.batchDraw();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user