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:
Lucas Oliveira 2025-04-11 23:35:40 -03:00 committed by GitHub
commit 801276cbb7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 20 additions and 13 deletions

View file

@ -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}

View file

@ -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();

View file

@ -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();

View file

@ -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();

View file

@ -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,