File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
app/src/core/service/dataManageService/copyEngine Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 11import { Serialized } from "../../../../types/node" ;
2+ import { isMac } from "../../../../utils/platform" ;
23import { Rectangle } from "../../../dataStruct/shape/Rectangle" ;
34import { Vector } from "../../../dataStruct/Vector" ;
45import { Renderer } from "../../../render/canvas2d/renderer" ;
@@ -8,6 +9,7 @@ import { StageManager } from "../../../stage/stageManager/StageManager";
89import { Entity } from "../../../stage/stageObject/abstract/StageEntity" ;
910import { ImageNode } from "../../../stage/stageObject/entity/ImageNode" ;
1011import { TextNode } from "../../../stage/stageObject/entity/TextNode" ;
12+ import { Controller } from "../../controlService/controller/Controller" ;
1113import { MouseLocation } from "../../controlService/MouseLocation" ;
1214import { copyEnginePasteImage } from "./pasteImage" ;
1315import { copyEnginePastePlainText } from "./pastePlainText" ;
@@ -149,6 +151,14 @@ export namespace CopyEngine {
149151 } else {
150152 StageSerializedAdder . addSerializedData ( copyBoardData , copyBoardMouseVector ) ;
151153 }
154+ if ( isMac ) {
155+ // mac下无法直接粘贴,还要点一个按钮,但这导致
156+ // 按下按钮后,程序中依然显示 meta v 仍然在按下状态
157+ // 因此需要主动删除
158+ setTimeout ( ( ) => {
159+ Controller . pressingKeySet . clear ( ) ;
160+ } , 500 ) ;
161+ }
152162 }
153163
154164 export function pasteWithOriginLocation ( ) {
You can’t perform that action at this time.
0 commit comments