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

Don't show frame controls outside of the geojs viewer #1226

Merged
merged 1 commit into from
Jun 28, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Bug Fixes
- Pass style to histogram endpoint as json ([#1220](../../pull/1220))
- Don't show frame controls outside of the geojs viewer ([#1226](../../pull/1226))

## 1.23.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,3 @@
position absolute
top 0
left 0

.image-controls-frame
label
margin-right 8px

input.image-controls-number
display inline-block
vertical-align middle
width 60px
margin-right 8px

input.image-controls-slider
display inline-block
vertical-align middle
width 30%
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,5 @@
option(value=viewer.name) #{viewer.label}
.image-controls
#vue-container
span.image-controls-frame.hidden
label(for='image-frame') Frame:
input#image-frame-number.image-controls-number(type='number', min='0', value='0')
input#image-frame.image-controls-slider(type='range', min='0', value='0')
each viewer in viewers
.image-viewer.hidden(id=viewer.name)
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ var ImageViewerSelectWidget = View.extend({
this.currentViewer = null;
}
// hide general image controls; individual viewers must enable them
this.$('.image-controls>span').toggleClass('hidden', true);
this.$('.image-controls>div').toggleClass('hidden', true);
this._frameUpdate = null;
this.$('.image-viewer').toggleClass('hidden', true);

Expand Down Expand Up @@ -121,6 +121,7 @@ var ImageViewerSelectWidget = View.extend({
* there is only one frame.
*/
setFrames: function (metadata, frameUpdate) {
this.$('.image-controls>div').toggleClass('hidden', false);
// Vue frame control
this._createVue(metadata, frameUpdate);
},
Expand Down
6 changes: 3 additions & 3 deletions girder/test_girder/web_client_specs/imageViewerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ $(function () {
});
it('adjust frame slider', function () {
runs(function () {
expect($('.image-controls-frame').length).toBe(1);
$('.image-controls-number').val(1).trigger('input');
expect($('.image-frame-control-box').length).toBe(1);
$('.image-frame-control-box input:visible').eq(1).val(1).trigger('input');
});
girderTest.waitForLoad();
waitsFor(function () {
return $('.image-controls-slider').val() === '1';
return $('.image-frame-control-box input:visible').eq(1).val() === '1';
}, 'control slider to update');
});
});
Expand Down