Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Imviz panning more seamless #864

Merged
merged 2 commits into from
Sep 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions jdaviz/configs/imviz/plugins/viewers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ def __init__(self, *args, **kwargs):
self.state.show_axes = False
self.figure.fig_margin = {'left': 0, 'bottom': 0, 'top': 0, 'right': 0}

# By default, glue computes a fixed resolution buffer that matches the
# axes - but this means that when panning, one sees white outside of
# the original buffer until the buffer updates again, thus there is a
# lag in the image display. By increasing the external padding to 0.5
# the image is made larger by 50% along all four sides, helping create
# the illusion of smooth panning. We can increase this further to
# improve the panning experience, but this can cause a larger delay
# when the image does need to update as it will be more computationally
# intensive.
self.state.image_external_padding = 0.5

def on_mouse_or_key_event(self, data):

# Find visible layers
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ install_requires =
bqplot>=0.12.29
bqplot-image-gl>=1.4.1
glue-core>=1.2.1
glue-jupyter>=0.8.1
glue-jupyter>=0.9
echo>=0.5.0
ipyvue>=1.4.1
ipyvuetify>=1.7.0
Expand Down