@@ -266,7 +266,7 @@ export declare interface ControlsInterface {
266
266
disableZoom : boolean ;
267
267
disablePan : boolean ;
268
268
disableTap : boolean ;
269
- a11y : A11yTranslationsInterface | string | null ;
269
+ a11y : A11yTranslationsInterface | string | null ;
270
270
getCameraOrbit ( ) : SphericalPosition ;
271
271
getCameraTarget ( ) : Vector3D ;
272
272
getFieldOfView ( ) : number ;
@@ -378,7 +378,7 @@ export const ControlsMixin = <T extends Constructor<ModelViewerElementBase>>(
378
378
@property ( { type : Number , attribute : 'interpolation-decay' } )
379
379
interpolationDecay : number = DECAY_MILLISECONDS ;
380
380
381
- @property ( ) a11y : A11yTranslationsInterface | string | null = null ;
381
+ @property ( ) a11y : A11yTranslationsInterface | string | null = null ;
382
382
383
383
protected [ $promptElement ] =
384
384
this . shadowRoot ! . querySelector ( '.interaction-prompt' ) as HTMLElement ;
@@ -430,7 +430,7 @@ export const ControlsMixin = <T extends Constructor<ModelViewerElementBase>>(
430
430
getCameraTarget ( ) : Vector3D {
431
431
return toVector3D (
432
432
this [ $renderer ] . isPresenting ? this [ $renderer ] . arRenderer . target :
433
- this [ $scene ] . getTarget ( ) ) ;
433
+ this [ $scene ] . getDynamicTarget ( ) ) ;
434
434
}
435
435
436
436
getFieldOfView ( ) : number {
@@ -835,23 +835,22 @@ export const ControlsMixin = <T extends Constructor<ModelViewerElementBase>>(
835
835
[ $updateAria ] ( ) {
836
836
const { theta, phi} =
837
837
this [ $controls ] ! . getCameraSpherical ( this [ $lastSpherical ] ) ;
838
-
838
+
839
839
const azimuthalQuadrant =
840
840
( 4 + Math . floor ( ( ( theta % TAU ) + QUARTER_PI ) / HALF_PI ) ) % 4 ;
841
-
841
+
842
842
const polarTrient = Math . floor ( phi / THIRD_PI ) ;
843
-
843
+
844
844
const azimuthalQuadrantLabel =
845
845
AZIMUTHAL_QUADRANT_LABELS [ azimuthalQuadrant ] ;
846
846
const polarTrientLabel = POLAR_TRIENT_LABELS [ polarTrient ] ;
847
847
const position = `${ polarTrientLabel } ${ azimuthalQuadrantLabel } ` ;
848
-
848
+
849
849
const key = position as keyof A11yTranslationsInterface ;
850
850
if ( key in this [ $a11y ] ) {
851
851
this [ $updateStatus ] ( this [ $a11y ] [ key ] ) ;
852
852
} else {
853
- this [ $updateStatus ] (
854
- `View from stage ${ position } ` ) ;
853
+ this [ $updateStatus ] ( `View from stage ${ position } ` ) ;
855
854
}
856
855
}
857
856
@@ -924,7 +923,8 @@ export const ControlsMixin = <T extends Constructor<ModelViewerElementBase>>(
924
923
} ;
925
924
926
925
[ $onPointerChange ] = ( event : PointerChangeEvent ) => {
927
- this [ $container ] . classList . toggle ( 'pointer-tumbling' , event . type === 'pointer-change-start' ) ;
926
+ this [ $container ] . classList . toggle (
927
+ 'pointer-tumbling' , event . type === 'pointer-change-start' ) ;
928
928
} ;
929
929
930
930
[ $updateA11y ] ( ) {
@@ -936,7 +936,9 @@ export const ControlsMixin = <T extends Constructor<ModelViewerElementBase>>(
936
936
console . warn ( 'Error parsing a11y JSON:' , error ) ;
937
937
}
938
938
} else if ( this . a11y . length > 0 ) {
939
- console . warn ( 'Error not supported format, should be a JSON string:' , this . a11y ) ;
939
+ console . warn (
940
+ 'Error not supported format, should be a JSON string:' ,
941
+ this . a11y ) ;
940
942
} else {
941
943
this [ $a11y ] = < A11yTranslationsInterface > { } ;
942
944
}
@@ -945,7 +947,7 @@ export const ControlsMixin = <T extends Constructor<ModelViewerElementBase>>(
945
947
} else {
946
948
this [ $a11y ] = < A11yTranslationsInterface > { } ;
947
949
}
948
-
950
+
949
951
this [ $userInputElement ] . setAttribute ( 'aria-label' , this [ $ariaLabel ] ) ;
950
952
}
951
953
}
0 commit comments