Skip to content

Commit

Permalink
Merge pull request #665 from girder/better-control-class
Browse files Browse the repository at this point in the history
Add a more precise class to the image viewer selector
  • Loading branch information
manthey authored Oct 4, 2021
2 parents 9bd25e0 + f4af693 commit 1b8f663
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## Version 1.8.2

### Improvements
- Make the image viewer control class more precise (#665)

## Version 1.8.1

### Improvements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.g-item-info-header
i.icon-picture
span Image Viewer
select.form-control.input-sm
select.form-control.input-sm.image-viewer-control
each viewer in viewers
option(value=viewer.name) #{viewer.label}
.image-controls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ wrap(ItemView, 'render', function (render) {

var ImageViewerSelectWidget = View.extend({
events: {
'change select': function (event) {
'change select.image-viewer-control': function (event) {
this._selectViewer(event.target.value);
},
'keyup select': function (event) {
'keyup select.image-viewer-control': function (event) {
this._selectViewer(event.target.value);
},
'input #image-frame,#image-frame-number': function (event) {
Expand All @@ -60,7 +60,7 @@ var ImageViewerSelectWidget = View.extend({
if (_.findWhere(largeImageConfig.viewers, {name: name}) === undefined) {
name = largeImageConfig.viewers[0].name;
}
this.$('select.form-control').val(name);
this.$('select.form-control.image-viewer-control').val(name);
this._selectViewer(name);
return this;
},
Expand Down

0 comments on commit 1b8f663

Please sign in to comment.