mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Stop using getTransform (#950)
* Stop using getTransform Fixes #861 The original motivation behind this is to make it work with Firefox. But it also helped make the code more intentional. Test Plan: - Create one square, select it, zoom in repeatedly, make sure that it zooms centered in the screen and everything looks good - Scroll at various zoom levels, things look good - Export a small scene at 1x and 3x, make sure the background is properly set and look good * fix selection element
This commit is contained in:
parent
dbfc8bee57
commit
b20d4539c0
6 changed files with 29 additions and 76 deletions
|
@ -303,6 +303,10 @@ export function renderElement(
|
|||
context.fillStyle = "rgba(0, 0, 255, 0.10)";
|
||||
context.fillRect(0, 0, element.width, element.height);
|
||||
context.fillStyle = fillStyle;
|
||||
context.translate(
|
||||
-element.x - sceneState.scrollX,
|
||||
-element.y - sceneState.scrollY,
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "rectangle":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue