Skip to content

pydeck how to use on_view_state_change with orthographic view #5790

Answered by cornhundred
cornhundred asked this question in Q&A
Discussion options

You must be logged in to vote

I followed the instructions to inspect the payload using an HTML widget using this function

def filter_by_viewport(widget_instance, payload):
    text.value = str(payload)

and saw outputs like this

{'type': 'deck-view-state-change-event', 'data': {'width': 985, 'height': 500, 'orbitAxis': 'Z', 'rotationX': 0, 'rotationOrbit': 0, 'target': [363.30811230604013, 362.781105203365, 4.490630090003833e-12], 'zoom': 0.24283613435629614, 'minRotationX': -90, 'maxRotationX': 90, 'minZoom': None, 'maxZoom': None, 'transitionDuration': 1, 'transitionInterpolator': {'_propsToCompare': ['target', 'zoom'], '_propsToExtract': ['target', 'zoom'], '_requiredProps': ['target', 'zoom'], 'opts': ['target', '…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@cornhundred
Comment options

@ajduberstein
Comment options

Answer selected by cornhundred
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants