-
Notifications
You must be signed in to change notification settings - Fork 43
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
Jupyter Frame Selector component #1738
base: master
Are you sure you want to change the base?
Conversation
ed08d58
to
ba22d9c
Compare
ccc83cb
to
fd41910
Compare
aa6bca8
to
b9a13d9
Compare
cfd5191
to
6d65b1f
Compare
6d65b1f
to
51783f3
Compare
d3377c5
to
dadab11
Compare
dadab11
to
82dcb36
Compare
9d4705a
to
724c7f9
Compare
large_image/tilesource/jupyter.py
Outdated
def get_frame_histogram(self, query): | ||
if self._layer is not None: | ||
frame = query.get('frame') | ||
frame_histograms = self.frame_selector.frameHistograms or {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you copy this and modify the copy? If there are concurrent histogram requests, won't this end up just keeping the last one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The copy is done so that we set self.frame_selector.frame_histograms
to a new object to trigger the Vue watcher that detects changes to that object. Without the copy statement, only the first histogram will be shown and Vue cannot detect subsequent updates. I haven't encountered a case where concurrent requests overwrite one another, but maybe some extra bookkeeping on this class could resolve that.
This PR moves and refactors the component files for the Frame Selector such that the widget can be used in the Girder/Backbone context as well as the Jupyter context, using the same source code.
frame_selector.mp4