File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
app/src/core/service/controlService/controller/concrete Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { TextRiseEffect } from "../../../feedbackService/effectEngine/concrete/T
1313import { ViewFlashEffect } from "../../../feedbackService/effectEngine/concrete/ViewFlashEffect" ;
1414import { ControllerClassDragFile } from "../ControllerClassDragFile" ;
1515import { Dialog } from "../../../../../components/dialog" ;
16+ import { CircleChangeRadiusEffect } from "../../../feedbackService/effectEngine/concrete/CircleChangeRadiusEffect" ;
1617
1718/**
1819 * BUG: 始终无法触发文件拖入事件
@@ -151,16 +152,8 @@ function readFileText(file: File): Promise<string> {
151152
152153function dealTempFileDrop ( mouseWorldLocation : Vector ) {
153154 // 未知类型,按插入一个textNode判断
154- const textNode = new TextNode ( {
155- uuid : uuidv4 ( ) ,
156- text : "拖入文件为空" ,
157- location : [ mouseWorldLocation . x , mouseWorldLocation . y ] ,
158- size : [ 100 , 100 ] ,
159- color : [ 0 , 0 , 0 , 0 ] ,
160- details : "如果您想拖入文字直接来生成节点,建议先复制,然后直接在舞台上按ctrl+v" ,
161- } ) ;
162- textNode . move ( new Vector ( - textNode . rectangle . size . x / 2 , - textNode . rectangle . size . y / 2 ) ) ;
163- StageManager . addTextNode ( textNode ) ;
155+ Stage . effectMachine . addEffect ( new TextRiseEffect ( "不能直接拖入文字" ) ) ;
156+ Stage . effectMachine . addEffect ( CircleChangeRadiusEffect . fromConnectPointShrink ( mouseWorldLocation , 100 ) ) ;
164157}
165158
166159function dealUnknownFileDrop ( file : File , mouseWorldLocation : Vector , i : number ) {
You can’t perform that action at this time.
0 commit comments