File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
app/src/core/service/controlService/controller/concrete Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 11import { Vector } from "../../../../dataStruct/Vector" ;
22import { Renderer } from "../../../../render/canvas2d/renderer" ;
33import { StageManager } from "../../../../stage/stageManager/StageManager" ;
4+ import { ImageNode } from "../../../../stage/stageObject/entity/ImageNode" ;
45import { Controller } from "../Controller" ;
56import { ControllerClass } from "../ControllerClass" ;
67
@@ -14,11 +15,13 @@ ControllerImageScale.mousewheel = (event: WheelEvent) => {
1415 return ;
1516 }
1617 // 需要注意缩放逻辑和视野缩放逻辑保持一致性
17- if ( event . deltaY > 0 ) {
18- // 放大图片
19- hoverImageNode . scaleUpdate ( - 0.1 ) ;
20- } else if ( event . deltaY < 0 ) {
21- hoverImageNode . scaleUpdate ( + 0.1 ) ;
18+ for ( const imageNode of StageManager . getSelectedEntities ( ) . filter ( ( entity ) => entity instanceof ImageNode ) ) {
19+ if ( event . deltaY > 0 ) {
20+ // 放大图片
21+ imageNode . scaleUpdate ( - 0.1 ) ;
22+ } else if ( event . deltaY < 0 ) {
23+ imageNode . scaleUpdate ( + 0.1 ) ;
24+ }
2225 }
2326 }
2427} ;
You can’t perform that action at this time.
0 commit comments