Skip to content

Commit 66754f6

Browse files
committed
1 parent decdca4 commit 66754f6

File tree

1 file changed

+9
-2
lines changed
  • packages/project-editor/flow/runtime-viewer

1 file changed

+9
-2
lines changed

packages/project-editor/flow/runtime-viewer/viewer.tsx

+9-2
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export const Canvas = observer(
201201
}
202202

203203
onWheel = (event: WheelEvent) => {
204-
if (event.buttons === 4 || this.props.flowContext.frontFace) {
204+
if (event.buttons === 4) {
205205
// do nothing if mouse wheel is pressed, i.e. pan will be activated in onMouseDown
206206
return;
207207
}
@@ -235,13 +235,20 @@ export const Canvas = observer(
235235
((y - transform.translate.y) * scale) / transform.scale;
236236

237237
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+
}
239242

240243
runInAction(() => {
241244
this.props.flowContext.viewState.transform = transform;
242245
});
243246
}
244247
} else {
248+
if (this.props.flowContext.frontFace) {
249+
return;
250+
}
251+
245252
transform.translate = {
246253
x:
247254
transform.translate.x -

0 commit comments

Comments
 (0)