Skip to content

Commit fd7be53

Browse files
fix: emit position event on reference change
1 parent 486d5b2 commit fd7be53

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/viewer/Observer.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,17 @@ export class Observer {
371371
this._viewer.fire(type, event);
372372
}));
373373

374+
subs.push(this._navigator.stateService.reference$
375+
.subscribe(
376+
(): void => {
377+
const type: ViewerEventType = "position";
378+
const event: ViewerStateEvent = {
379+
target: this._viewer,
380+
type,
381+
};
382+
this._viewer.fire(type, event);
383+
}));
384+
374385
subs.push(this._container.renderService.renderCamera$.pipe(
375386
distinctUntilChanged(
376387
([phi1, theta1], [phi2, theta2]): boolean => {

0 commit comments

Comments
 (0)