mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-19 01:39:27 -04:00
cleanup save/restore
This commit is contained in:
parent
d2d80602e9
commit
051b0cdd4b
@ -36,8 +36,9 @@ const _renderNewElementScene = ({
|
||||
normalizedHeight,
|
||||
});
|
||||
|
||||
// Apply zoom
|
||||
context.save();
|
||||
|
||||
// Apply zoom
|
||||
context.scale(appState.zoom.value, appState.zoom.value);
|
||||
|
||||
if (newElement && newElement.type !== "selection") {
|
||||
@ -51,8 +52,6 @@ const _renderNewElementScene = ({
|
||||
|
||||
const frameId = newElement.frameId || appState.frameToHighlight?.id;
|
||||
|
||||
context.save();
|
||||
|
||||
if (
|
||||
frameId &&
|
||||
appState.frameRendering.enabled &&
|
||||
@ -77,11 +76,11 @@ const _renderNewElementScene = ({
|
||||
renderConfig,
|
||||
appState,
|
||||
);
|
||||
|
||||
context.restore();
|
||||
} else {
|
||||
context.clearRect(0, 0, normalizedWidth, normalizedHeight);
|
||||
}
|
||||
|
||||
context.restore();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user