Skip to content

Commit 70b3b2a

Browse files
committed
🚨 修复 ControllerGamepad
1 parent 65229ba commit 70b3b2a

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/core/stage/Stage.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { family } from "@tauri-apps/plugin-os";
33
import { Serialized } from "../../types/node";
44
import { PathString } from "../../utils/pathString";
55
import { Controller } from "../controller/Controller";
6-
import { ControllerGamepad } from "../controller/ControllerGamepad";
76
import { Line } from "../dataStruct/shape/Line";
87
import { Rectangle } from "../dataStruct/shape/Rectangle";
98
import { Vector } from "../dataStruct/Vector";
@@ -14,11 +13,11 @@ import { Edge } from "../stageObject/association/Edge";
1413
import { Section } from "../stageObject/entity/Section";
1514
import { TextNode } from "../stageObject/entity/TextNode";
1615
import { ConnectableEntity, Entity } from "../stageObject/StageObject";
16+
import { autoComputeEngineTick } from "./autoComputeEngine/mainTick";
17+
import { autoLayoutMainTick } from "./autoLayoutEngine/mainTick";
1718
import { StageDumper } from "./StageDumper";
1819
import { StageManager } from "./stageManager/StageManager";
1920
import { StageSaveManager } from "./StageSaveManager";
20-
import { autoComputeEngineTick } from "./autoComputeEngine/mainTick";
21-
import { autoLayoutMainTick } from "./autoLayoutEngine/mainTick";
2221
/**
2322
* 舞台对象
2423
* 更广义的舞台,
@@ -195,8 +194,6 @@ export namespace Stage {
195194
// eslint-disable-next-line prefer-const
196195
export let draggingLocation = Vector.getZero();
197196

198-
let controllerGamepad: ControllerGamepad | null = null;
199-
200197
/**
201198
* 自动保存是否处于暂停状态
202199
* 主要用于防止自动保存出bug,产生覆盖文件的问题
@@ -237,10 +234,6 @@ export namespace Stage {
237234
// 清理过时特效
238235
effects = effects.filter((effect) => !effect.timeProgress.isFull);
239236

240-
if (controllerGamepad) {
241-
controllerGamepad.tick();
242-
}
243-
244237
// 计算引擎
245238
autoComputeEngineTick();
246239
// 自动布局
@@ -283,7 +276,6 @@ export namespace Stage {
283276
Settings.watch("enableDragAutoAlign", (value) => {
284277
enableDragAutoAlign = value;
285278
});
286-
controllerGamepad = new ControllerGamepad();
287279
}
288280

289281
// private

0 commit comments

Comments
 (0)