File tree 1 file changed +9
-2
lines changed
packages/project-editor/flow/runtime-viewer
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ export const Canvas = observer(
201
201
}
202
202
203
203
onWheel = ( event : WheelEvent ) => {
204
- if ( event . buttons === 4 || this . props . flowContext . frontFace ) {
204
+ if ( event . buttons === 4 ) {
205
205
// do nothing if mouse wheel is pressed, i.e. pan will be activated in onMouseDown
206
206
return ;
207
207
}
@@ -235,13 +235,20 @@ export const Canvas = observer(
235
235
( ( y - transform . translate . y ) * scale ) / transform . scale ;
236
236
237
237
transform . scale = scale ;
238
- transform . translate = { x : tx , y : ty } ;
238
+
239
+ if ( ! this . props . flowContext . frontFace ) {
240
+ transform . translate = { x : tx , y : ty } ;
241
+ }
239
242
240
243
runInAction ( ( ) => {
241
244
this . props . flowContext . viewState . transform = transform ;
242
245
} ) ;
243
246
}
244
247
} else {
248
+ if ( this . props . flowContext . frontFace ) {
249
+ return ;
250
+ }
251
+
245
252
transform . translate = {
246
253
x :
247
254
transform . translate . x -
You can’t perform that action at this time.
0 commit comments