fix: revert "feat: adds pan and pinch nav mode like figma" (#7603)
Revert "feat: adds pan and pinch nav mode like figma (#7410)"
This reverts commit a2c5090c7a.
This commit is contained in:
parent
b39fdc5b7d
commit
801276cbb7
5 changed files with 20 additions and 13 deletions
|
|
@ -30,7 +30,6 @@ import {
|
|||
ReactFlow,
|
||||
reconnectEdge,
|
||||
SelectionDragHandler,
|
||||
SelectionMode,
|
||||
} from "@xyflow/react";
|
||||
import _, { cloneDeep } from "lodash";
|
||||
import {
|
||||
|
|
@ -571,9 +570,7 @@ export default function Page({
|
|||
onNodeDragStop={onNodeDragStop}
|
||||
onDrop={onDrop}
|
||||
onSelectionChange={onSelectionChange}
|
||||
selectionMode={SelectionMode.Partial}
|
||||
deleteKeyCode={[]}
|
||||
multiSelectionKeyCode={["Shift"]}
|
||||
fitView={isEmptyFlow.current ? false : true}
|
||||
fitViewOptions={{
|
||||
minZoom: 0.2,
|
||||
|
|
@ -582,9 +579,9 @@ export default function Page({
|
|||
className="theme-attribution"
|
||||
minZoom={0.2}
|
||||
maxZoom={3}
|
||||
panOnDrag={[1, 2]}
|
||||
panOnScroll={!view}
|
||||
selectionOnDrag={!view}
|
||||
zoomOnScroll={!view}
|
||||
zoomOnPinch={!view}
|
||||
panOnDrag={!view}
|
||||
panActivationKeyCode={""}
|
||||
proOptions={{ hideAttribution: true }}
|
||||
onPaneClick={onPaneClick}
|
||||
|
|
|
|||
|
|
@ -17,9 +17,15 @@ test.describe("group node test", () => {
|
|||
await page.getByTestId("fit_view").first().click();
|
||||
|
||||
await page.getByTestId("title-OpenAI").click();
|
||||
await page.getByTestId("title-OpenAI").click({ modifiers: ["Shift"] });
|
||||
await page.getByTestId("title-Prompt").click({ modifiers: ["Shift"] });
|
||||
await page.getByTestId("title-OpenAI").click({ modifiers: ["Shift"] });
|
||||
await page
|
||||
.getByTestId("title-OpenAI")
|
||||
.click({ modifiers: ["ControlOrMeta"] });
|
||||
await page
|
||||
.getByTestId("title-Prompt")
|
||||
.click({ modifiers: ["ControlOrMeta"] });
|
||||
await page
|
||||
.getByTestId("title-OpenAI")
|
||||
.click({ modifiers: ["ControlOrMeta"] });
|
||||
|
||||
await page.getByRole("button", { name: "Group" }).click();
|
||||
await page.getByTestId("title-Group").click();
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ test.describe("save component tests", () => {
|
|||
await zoomOut(page, 2);
|
||||
|
||||
await page.getByTestId("title-Agent Initializer").click({
|
||||
modifiers: ["Shift"],
|
||||
modifiers: ["Control"],
|
||||
});
|
||||
|
||||
await page.getByRole("button", { name: "Group" }).click();
|
||||
|
|
|
|||
|
|
@ -16,8 +16,12 @@ test.describe("group node test", () => {
|
|||
.click();
|
||||
await page.getByTestId("fit_view").first().click();
|
||||
|
||||
await page.getByTestId("title-OpenAI").click({ modifiers: ["Shift"] });
|
||||
await page.getByTestId("title-Prompt").click({ modifiers: ["Shift"] });
|
||||
await page
|
||||
.getByTestId("title-OpenAI")
|
||||
.click({ modifiers: ["ControlOrMeta"] });
|
||||
await page
|
||||
.getByTestId("title-Prompt")
|
||||
.click({ modifiers: ["ControlOrMeta"] });
|
||||
|
||||
await page.getByRole("button", { name: "Group" }).click();
|
||||
await page.getByTestId("title-Group").click();
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ test(
|
|||
await page
|
||||
.getByTestId("title-Combine Text")
|
||||
.first()
|
||||
.click({ modifiers: ["Shift"] });
|
||||
.click({ modifiers: ["ControlOrMeta"] });
|
||||
|
||||
await page.waitForSelector('[data-testid="group-node"]', {
|
||||
timeout: 3000,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue