mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-20 12:44:38 +01:00
green
This commit is contained in:
@@ -1192,7 +1192,7 @@ const ExcalidrawWrapper = () => {
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
scrollConstraints={constraints.enabled ? constraints : undefined}
|
||||
// scrollConstraints={constraints.enabled ? constraints : undefined}
|
||||
onLinkOpen={(element, event) => {
|
||||
if (element.link && isElementLink(element.link)) {
|
||||
event.preventDefault();
|
||||
@@ -1200,12 +1200,12 @@ const ExcalidrawWrapper = () => {
|
||||
}
|
||||
}}
|
||||
>
|
||||
{excalidrawAPI && !isTestEnv() && (
|
||||
{/* {excalidrawAPI && !isTestEnv() && (
|
||||
<ConstraintsSettings
|
||||
excalidrawAPI={excalidrawAPI}
|
||||
initialConstraints={constraints}
|
||||
/>
|
||||
)}
|
||||
)} */}
|
||||
<AppMainMenu
|
||||
onCollabDialogOpen={onCollabDialogOpen}
|
||||
isCollaborating={isCollaborating}
|
||||
|
||||
@@ -125,7 +125,10 @@ const ExcalidrawBase = (props: ExcalidrawProps) => {
|
||||
renderTopLeftUI={renderTopLeftUI}
|
||||
renderTopRightUI={renderTopRightUI}
|
||||
langCode={langCode}
|
||||
viewModeEnabled={viewModeEnabled ?? !!scrollConstraints}
|
||||
viewModeEnabled={
|
||||
viewModeEnabled ??
|
||||
(scrollConstraints != null ? !!scrollConstraints : undefined)
|
||||
}
|
||||
zenModeEnabled={zenModeEnabled}
|
||||
gridModeEnabled={gridModeEnabled}
|
||||
libraryReturnUrl={libraryReturnUrl}
|
||||
|
||||
@@ -12537,6 +12537,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on e
|
||||
},
|
||||
"previousSelectedElementIds": {},
|
||||
"resizingElement": null,
|
||||
"scrollConstraints": null,
|
||||
"scrollX": 0,
|
||||
"scrollY": 0,
|
||||
"searchMatches": null,
|
||||
@@ -12746,6 +12747,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on e
|
||||
},
|
||||
"previousSelectedElementIds": {},
|
||||
"resizingElement": null,
|
||||
"scrollConstraints": null,
|
||||
"scrollX": 0,
|
||||
"scrollY": 0,
|
||||
"searchMatches": null,
|
||||
@@ -12958,6 +12960,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on i
|
||||
},
|
||||
"previousSelectedElementIds": {},
|
||||
"resizingElement": null,
|
||||
"scrollConstraints": null,
|
||||
"scrollX": 0,
|
||||
"scrollY": 0,
|
||||
"searchMatches": null,
|
||||
@@ -13258,6 +13261,7 @@ exports[`history > singleplayer undo/redo > should create new history entry on i
|
||||
},
|
||||
"previousSelectedElementIds": {},
|
||||
"resizingElement": null,
|
||||
"scrollConstraints": null,
|
||||
"scrollX": 0,
|
||||
"scrollY": 0,
|
||||
"searchMatches": null,
|
||||
@@ -15599,6 +15603,7 @@ exports[`history > singleplayer undo/redo > should not modify anything on unrela
|
||||
},
|
||||
"previousSelectedElementIds": {},
|
||||
"resizingElement": null,
|
||||
"scrollConstraints": null,
|
||||
"scrollX": 0,
|
||||
"scrollY": 0,
|
||||
"searchMatches": null,
|
||||
|
||||
@@ -100,12 +100,18 @@ describe("contextMenu element", () => {
|
||||
];
|
||||
|
||||
expect(contextMenu).not.toBeNull();
|
||||
expect(contextMenuOptions?.length).toBe(expectedShortcutNames.length);
|
||||
expectedShortcutNames.forEach((shortcutName) => {
|
||||
expect(
|
||||
contextMenu?.querySelector(`li[data-testid="${shortcutName}"]`),
|
||||
).not.toBeNull();
|
||||
try {
|
||||
expect(
|
||||
contextMenu?.querySelector(`li[data-testid="${shortcutName}"]`),
|
||||
).not.toBeNull();
|
||||
} catch (err) {
|
||||
throw new Error(
|
||||
`Failed to find context menu item with test id: ${shortcutName}`,
|
||||
);
|
||||
}
|
||||
});
|
||||
expect(contextMenuOptions?.length).toBe(expectedShortcutNames.length);
|
||||
});
|
||||
|
||||
it("shows context menu for element", () => {
|
||||
|
||||
Reference in New Issue
Block a user