Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 62da620e authored by usov_i's avatar usov_i
Browse files

Remove animate button

Projection plots provide a better alternative
parent fa4d6cce
No related branches found
No related tags found
No related merge requests found
import numpy as np import numpy as np
from bokeh.io import curdoc
from bokeh.layouts import column, gridplot, row from bokeh.layouts import column, gridplot, row
from bokeh.models import ( from bokeh.models import (
BasicTicker, BasicTicker,
...@@ -38,8 +37,6 @@ IMAGE_H = 128 ...@@ -38,8 +37,6 @@ IMAGE_H = 128
def create(init_meta): def create(init_meta):
doc = curdoc()
curent_h5_data = np.array([]) curent_h5_data = np.array([])
current_index = None current_index = None
det_data = {} det_data = {}
...@@ -339,21 +336,6 @@ def create(init_meta): ...@@ -339,21 +336,6 @@ def create(init_meta):
next_button = Button(label="Next") next_button = Button(label="Next")
next_button.on_click(next_button_callback) next_button.on_click(next_button_callback)
def animate():
next_button_callback()
cb = None
def animate_toggle_callback(active):
nonlocal cb
if active:
cb = doc.add_periodic_callback(animate, 300)
else:
doc.remove_periodic_callback(cb)
animate_toggle = Toggle(label="Animate")
animate_toggle.on_click(animate_toggle_callback)
cmap_dict = { cmap_dict = {
"gray": Greys256, "gray": Greys256,
"gray_reversed": Greys256[::-1], "gray_reversed": Greys256[::-1],
...@@ -451,7 +433,7 @@ def create(init_meta): ...@@ -451,7 +433,7 @@ def create(init_meta):
# Final layout # Final layout
layout_image = gridplot([[proj_v, None], [plot, proj_h]], merge_tools=False) layout_image = gridplot([[proj_v, None], [plot, proj_h]], merge_tools=False)
animate_layout = column(index_spinner, next_button, prev_button, animate_toggle) animate_layout = column(index_spinner, next_button, prev_button)
colormap_layout = column(colormap, auto_toggle, display_max_spinner, display_min_spinner) colormap_layout = column(colormap, auto_toggle, display_max_spinner, display_min_spinner)
hkl_layout = column(radio_button_group, hkl_button) hkl_layout = column(radio_button_group, hkl_button)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment