This commit is contained in:
dwelle 2023-08-02 17:54:04 +02:00
parent 6711735b27
commit b0cdd00c2a
3 changed files with 9 additions and 2 deletions

View File

@ -8358,7 +8358,7 @@ class App extends React.Component<AppProps, AppState> {
width: AppState["width"], width: AppState["width"],
height: AppState["height"], height: AppState["height"],
) => { ) => {
const DEFAULT_VIEWPORT_ZOOM_FACTOR = 0.2; const DEFAULT_VIEWPORT_ZOOM_FACTOR = 0.7;
const lockZoom = scrollConstraints.lockZoom ?? false; const lockZoom = scrollConstraints.lockZoom ?? false;
const viewportZoomFactor = scrollConstraints.viewportZoomFactor const viewportZoomFactor = scrollConstraints.viewportZoomFactor

View File

@ -731,6 +731,13 @@ const ExcalidrawWrapper = () => {
/> />
); );
}} }}
scrollConstraints={{
x: 0,
y: 0,
width: 2560,
height: 1300,
lockZoom: true,
}}
> >
<AppMainMenu <AppMainMenu
setCollabDialogShown={setCollabDialogShown} setCollabDialogShown={setCollabDialogShown}

View File

@ -101,7 +101,7 @@ const ExcalidrawBase = (props: ExcalidrawProps) => {
onPointerUpdate={onPointerUpdate} onPointerUpdate={onPointerUpdate}
renderTopRightUI={renderTopRightUI} renderTopRightUI={renderTopRightUI}
langCode={langCode} langCode={langCode}
viewModeEnabled={viewModeEnabled || !!scrollConstraints} viewModeEnabled={viewModeEnabled /* || !!scrollConstraints */}
zenModeEnabled={zenModeEnabled} zenModeEnabled={zenModeEnabled}
gridModeEnabled={gridModeEnabled} gridModeEnabled={gridModeEnabled}
libraryReturnUrl={libraryReturnUrl} libraryReturnUrl={libraryReturnUrl}