You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If your View is an Orthographic View then the zoom can be a [number,number] type to denote independent x and y zoom values. In practice this works, however the ViewStateProps type is defined with zoom?: number so ts throws an type-checking error if you defined zoom = [1,1] for example, in a ViewStateProps object.
Type 'number[]' is not assignable to type 'number'
Minimal example to be used with an OrthographicView:
alexjbuck
changed the title
InitialViewStateProps Typescript object has missing type options for zoom
ViewStateProps Typescript object has missing type options for zoom
Feb 1, 2024
Description
If your View is an Orthographic View then the zoom can be a
[number,number]
type to denote independent x and y zoom values. In practice this works, however theViewStateProps
type is defined withzoom?: number
so ts throws an type-checking error if you definedzoom = [1,1]
for example, in a ViewStateProps object.Minimal example to be used with an
OrthographicView
:Flavors
Expected Behavior
I expect to be able to provide either
number
ornumber[]
to thezoom
prop in a ViewStateProps object.Steps to Reproduce
Minimal example to be used with an
OrthographicView
:Environment
Logs
No response
The text was updated successfully, but these errors were encountered: