fix: always show canvas local edit entry
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-05-19 13:35:33 +08:00
parent 2979446337
commit c5510e4936
2 changed files with 5 additions and 9 deletions

View File

@ -46,7 +46,6 @@ import {
} from "@/lib/canvas/video-canvas-markers";
import {
getCanvasToolbarItem,
isCanvasToolbarItemEnabled,
normalizeCanvasToolbarConfig,
type CanvasToolbarConfig,
} from "@/lib/canvas-toolbar-config";
@ -379,10 +378,8 @@ export function CanvasWorkspace({
canvasToolbarConfig,
"imageLocalEdit"
);
const selectedImageLocalEditEnabled = isCanvasToolbarItemEnabled(
canvasToolbarConfig,
"imageLocalEdit"
);
// 局部编辑属于主无限画布图片的固定能力,旧配置缺少该 key 时也保持可见。
const selectedImageLocalEditEnabled = true;
// Store actions
const setViewport = useCanvasStore((state) => state.setViewport);

View File

@ -1566,10 +1566,9 @@ export function ImageNode({
canvasToolbarConfig,
"imageBoxCutout"
);
const imageLocalEditEnabled = isCanvasToolbarItemEnabled(
canvasToolbarConfig,
"imageLocalEdit"
);
// 局部编辑是无限画布图片的核心入口:即使旧后台工具栏配置里还没有该 key,
// 也必须默认展示,避免历史配置把新功能吞掉。
const imageLocalEditEnabled = true;
const imageLayerSplitEnabledByToolbar = isCanvasToolbarItemEnabled(
canvasToolbarConfig,
"imageLayerSplit"