fix: stop flooring scroll positions (#2883)

This commit is contained in:
David Luzar 2021-01-31 10:47:43 +01:00 committed by GitHub
parent 10cd6a24b0
commit 1973ae9444
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 41 additions and 58 deletions

View file

@ -5,7 +5,6 @@ import { NonDeletedExcalidrawElement } from "../element/types";
import { getCommonBounds } from "../element/bounds";
import { renderScene, renderSceneToSvg } from "../renderer/renderScene";
import { distance, SVG_NS } from "../utils";
import { normalizeScroll } from "./scroll";
import { AppState } from "../types";
import { t } from "../i18n";
import { DEFAULT_FONT_FAMILY, DEFAULT_VERTICAL_ALIGN } from "../constants";
@ -59,8 +58,8 @@ export const exportToCanvas = (
tempCanvas,
{
viewBackgroundColor: exportBackground ? viewBackgroundColor : null,
scrollX: normalizeScroll(-minX + exportPadding),
scrollY: normalizeScroll(-minY + exportPadding),
scrollX: -minX + exportPadding,
scrollY: -minY + exportPadding,
zoom: getDefaultAppState().zoom,
remotePointerViewportCoords: {},
remoteSelectedElementIds: {},