Skip to content
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
4 changes: 4 additions & 0 deletions client/src/css/partials/_mc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,7 @@ span.run_state {
.yAxis .tickLabel.selected {
font-weight: bold;
}

span.cells {
cursor: pointer;
}
8 changes: 7 additions & 1 deletion client/src/js/modules/mc/views/datacollections.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ define(['backbone', 'marionette',
return
}

if (s.length > 1 && this.ui.pipeline.val() == 'fast_dp') {
app.alert({ message: 'Fast DP can only integrate a single sweep' })
return
}

var self = this
var p = this.pipelines.findWhere({ VALUE: self.ui.pipeline.val() })
var reprocessing = new Reprocessing({
Expand Down Expand Up @@ -283,7 +288,8 @@ define(['backbone', 'marionette',
this.$el.find('input[name='+f+']').val(ap.get('CELL')['CELL_'+k.toUpperCase()])
}, this)

this.$el.find('select[name=sg]').val(ap.get('SG'))
let sg = ap.get('SG')?.replace(/\s/g, '') ?? "";
this.$el.find('select[name=sg]').val(sg)
},

onDestroy: function() {
Expand Down
19 changes: 16 additions & 3 deletions client/src/js/modules/mc/views/dcdistl.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,24 @@ define(['marionette',

events: {
'click .cells': 'sendCell',
'click .all': 'selectAll',
},

sendCell: function(e) {
if (!this.aps.length) return
this.trigger('set:cell', this.aps.at(0))
},

selectAll: function(e) {
e.preventDefault()

var si = parseInt(this.model.get('SI'))
var ni = parseInt(this.model.get('NUMIMG'))

this.setSelection(si, si+ni-1)
this.plotview.setSelection(si, si+ni-1)
},


onShow: function() {
var w = 0.175*$(window).width()*0.95
Expand All @@ -43,11 +54,13 @@ define(['marionette',


setCell: function() {
let cells = 'N/A'
if (this.aps.length) {
var e = this.aps.at(0)
var c = e.get('CELL')
this.ui.cells.text(c['CELL_A']+','+c['CELL_B']+','+c['CELL_C']+','+c['CELL_AL']+','+c['CELL_BE']+','+c['CELL_GA'])
} else this.ui.cells.text('N/A')
if (c && Object.keys(c).length) cells = c['CELL_A']+','+c['CELL_B']+','+c['CELL_C']+','+c['CELL_AL']+','+c['CELL_BE']+','+c['CELL_GA']
}
this.ui.cells.text(cells)
},


Expand Down Expand Up @@ -75,4 +88,4 @@ define(['marionette',



})
})
2 changes: 1 addition & 1 deletion client/src/js/templates/mc/datacollection.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="state"></div>
<h1><%-IMP%>_<%-RUN%></h1>
<h1><%-IMP%>_<%-RUN%><a href="#" title="Select All" class="button all r"><i class="fa fa-arrows"></i></a></h1>
<h2><%-DIR%></h2>
<div class="distl" title="Per Image Analysis: Number of spots detected for each image. Select which images to integrate by dragging across the graph"></div>
<span>&<%-ROTATIONAXIS%>; Start: <%-AXISSTART%>&deg; &<%-ROTATIONAXIS%>; Osc: <%-AXISRANGE%>&deg; | <a title="Click to view diffraction images for this data collection" class="images" href="/dc/view/id/<%-ID%>">Images</a></span>
Expand Down
Loading