Add E2E test for transform gizmo commit and refactor viewport-host.ts
This commit is contained in:
@@ -5099,13 +5099,18 @@ export class ViewportHost {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.currentTransformSession.kind === "active") {
|
||||
if (this.currentTransformSession.sourcePanelId !== this.panelId) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
this.transformCommitHandler?.(this.currentTransformSession);
|
||||
return;
|
||||
}
|
||||
|
||||
const transformHandle = this.pickTransformHandle(event);
|
||||
const interactionSession =
|
||||
this.currentTransformSession.kind === "active"
|
||||
? this.currentTransformSession.sourcePanelId === this.panelId
|
||||
? this.currentTransformSession
|
||||
: null
|
||||
: this.getDisplayedTransformSession();
|
||||
const interactionSession = this.getDisplayedTransformSession();
|
||||
|
||||
if (transformHandle !== null && interactionSession !== null) {
|
||||
event.preventDefault();
|
||||
@@ -5164,21 +5169,6 @@ export class ViewportHost {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.currentTransformSession.kind === "active") {
|
||||
if (this.currentTransformSession.sourcePanelId !== this.panelId) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
this.currentTransformSession.source !== "gizmo" ||
|
||||
this.currentTransformSession.sourcePanelId === this.panelId
|
||||
) {
|
||||
event.preventDefault();
|
||||
this.transformCommitHandler?.(this.currentTransformSession);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.toolMode === "create" && this.creationPreview !== null) {
|
||||
const previewCenter = this.getCreationPreviewCenter(
|
||||
event,
|
||||
|
||||
Reference in New Issue
Block a user