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,
|
ReactFlow,
|
||||||
reconnectEdge,
|
reconnectEdge,
|
||||||
SelectionDragHandler,
|
SelectionDragHandler,
|
||||||
SelectionMode,
|
|
||||||
} from "@xyflow/react";
|
} from "@xyflow/react";
|
||||||
import _, { cloneDeep } from "lodash";
|
import _, { cloneDeep } from "lodash";
|
||||||
import {
|
import {
|
||||||
|
|
@ -571,9 +570,7 @@ export default function Page({
|
||||||
onNodeDragStop={onNodeDragStop}
|
onNodeDragStop={onNodeDragStop}
|
||||||
onDrop={onDrop}
|
onDrop={onDrop}
|
||||||
onSelectionChange={onSelectionChange}
|
onSelectionChange={onSelectionChange}
|
||||||
selectionMode={SelectionMode.Partial}
|
|
||||||
deleteKeyCode={[]}
|
deleteKeyCode={[]}
|
||||||
multiSelectionKeyCode={["Shift"]}
|
|
||||||
fitView={isEmptyFlow.current ? false : true}
|
fitView={isEmptyFlow.current ? false : true}
|
||||||
fitViewOptions={{
|
fitViewOptions={{
|
||||||
minZoom: 0.2,
|
minZoom: 0.2,
|
||||||
|
|
@ -582,9 +579,9 @@ export default function Page({
|
||||||
className="theme-attribution"
|
className="theme-attribution"
|
||||||
minZoom={0.2}
|
minZoom={0.2}
|
||||||
maxZoom={3}
|
maxZoom={3}
|
||||||
panOnDrag={[1, 2]}
|
zoomOnScroll={!view}
|
||||||
panOnScroll={!view}
|
zoomOnPinch={!view}
|
||||||
selectionOnDrag={!view}
|
panOnDrag={!view}
|
||||||
panActivationKeyCode={""}
|
panActivationKeyCode={""}
|
||||||
proOptions={{ hideAttribution: true }}
|
proOptions={{ hideAttribution: true }}
|
||||||
onPaneClick={onPaneClick}
|
onPaneClick={onPaneClick}
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,15 @@ test.describe("group node test", () => {
|
||||||
await page.getByTestId("fit_view").first().click();
|
await page.getByTestId("fit_view").first().click();
|
||||||
|
|
||||||
await page.getByTestId("title-OpenAI").click();
|
await page.getByTestId("title-OpenAI").click();
|
||||||
await page.getByTestId("title-OpenAI").click({ modifiers: ["Shift"] });
|
await page
|
||||||
await page.getByTestId("title-Prompt").click({ modifiers: ["Shift"] });
|
.getByTestId("title-OpenAI")
|
||||||
await page.getByTestId("title-OpenAI").click({ modifiers: ["Shift"] });
|
.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.getByRole("button", { name: "Group" }).click();
|
||||||
await page.getByTestId("title-Group").click();
|
await page.getByTestId("title-Group").click();
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ test.describe("save component tests", () => {
|
||||||
await zoomOut(page, 2);
|
await zoomOut(page, 2);
|
||||||
|
|
||||||
await page.getByTestId("title-Agent Initializer").click({
|
await page.getByTestId("title-Agent Initializer").click({
|
||||||
modifiers: ["Shift"],
|
modifiers: ["Control"],
|
||||||
});
|
});
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Group" }).click();
|
await page.getByRole("button", { name: "Group" }).click();
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,12 @@ test.describe("group node test", () => {
|
||||||
.click();
|
.click();
|
||||||
await page.getByTestId("fit_view").first().click();
|
await page.getByTestId("fit_view").first().click();
|
||||||
|
|
||||||
await page.getByTestId("title-OpenAI").click({ modifiers: ["Shift"] });
|
await page
|
||||||
await page.getByTestId("title-Prompt").click({ modifiers: ["Shift"] });
|
.getByTestId("title-OpenAI")
|
||||||
|
.click({ modifiers: ["ControlOrMeta"] });
|
||||||
|
await page
|
||||||
|
.getByTestId("title-Prompt")
|
||||||
|
.click({ modifiers: ["ControlOrMeta"] });
|
||||||
|
|
||||||
await page.getByRole("button", { name: "Group" }).click();
|
await page.getByRole("button", { name: "Group" }).click();
|
||||||
await page.getByTestId("title-Group").click();
|
await page.getByTestId("title-Group").click();
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ test(
|
||||||
await page
|
await page
|
||||||
.getByTestId("title-Combine Text")
|
.getByTestId("title-Combine Text")
|
||||||
.first()
|
.first()
|
||||||
.click({ modifiers: ["Shift"] });
|
.click({ modifiers: ["ControlOrMeta"] });
|
||||||
|
|
||||||
await page.waitForSelector('[data-testid="group-node"]', {
|
await page.waitForSelector('[data-testid="group-node"]', {
|
||||||
timeout: 3000,
|
timeout: 3000,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue