Skip to content

Commit

Permalink
LIMS-1422: Reprocessing dialog edits the end value unpredictably (#819)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Williams <[email protected]>
  • Loading branch information
ndg63276 and Mark Williams authored Sep 17, 2024
1 parent 34022a3 commit d28a9ef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions client/src/js/modules/dc/views/distl.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ define(['marionette', 'modules/dc/models/distl', 'utils',
},

plotSelected: function(e, ranges) {
this.trigger('plot:select', Math.floor(ranges.xaxis.from), Math.ceil(ranges.xaxis.to))
this.trigger('plot:select', Math.round(ranges.xaxis.from), Math.round(ranges.xaxis.to))
},

plotUnselected: function(e) {
Expand Down Expand Up @@ -112,4 +112,4 @@ define(['marionette', 'modules/dc/models/distl', 'utils',
}
})

})
})
20 changes: 13 additions & 7 deletions client/src/js/modules/dc/views/reprocess2.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,19 @@ define(['backbone', 'marionette', 'views/dialog',
var si = parseInt(this.model.get('SI'))
var ni = parseInt(this.model.get('NUMIMG'))

if (this.ui.st.val() > (si+ni-1)) this.ui.st.val(si+ni-1)
if (this.ui.st.val() < si) this.ui.st.val(si)
if (this.ui.st.val()) {
if (this.ui.st.val() > (si+ni-1)) this.ui.st.val(si+ni-1)
if (this.ui.st.val() < si) this.ui.st.val(si)
}

if (this.ui.en.val() > (si+ni-1)) this.ui.en.val(si+ni-1)
if (this.ui.en.val() < si) this.ui.en.val(si)
if (this.ui.en.val()) {
if (this.ui.en.val() > (si+ni-1)) this.ui.en.val(si+ni-1)
if (this.ui.en.val() < si) this.ui.en.val(si)
}

this.plotview.setSelection(parseInt(this.ui.st.val()), parseInt(this.ui.en.val()))
if (this.ui.st.val() && this.ui.en.val()) {
this.plotview.setSelection(parseInt(this.ui.st.val()), parseInt(this.ui.en.val()))
}
},

initialize: function(options) {
Expand Down Expand Up @@ -377,7 +383,7 @@ define(['backbone', 'marionette', 'views/dialog',
}, this)

$.when.apply($, reqs).done(function() {
app.alert({ message: jobs+' reprocessing job(s) successfully submitted'})
app.message({ message: jobs+' reprocessing job(s) successfully submitted'})
_.each(rps, function(rp) {
self._enqueue({ PROCESSINGJOBID: rp.get('PROCESSINGJOBID') })
})
Expand Down Expand Up @@ -463,7 +469,7 @@ define(['backbone', 'marionette', 'views/dialog',
reqs.push(reprocessingsweeps.save())

$.when.apply($, reqs).done(function() {
app.alert({ message: '1 reprocessing job successfully submitted'})
app.message({ message: '1 reprocessing job successfully submitted'})
self._enqueue({ PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID') })
})
},
Expand Down

0 comments on commit d28a9ef

Please sign in to comment.