forked from nebiolabs/plate-map
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apply-well-data.js
28 lines (23 loc) · 1.02 KB
/
apply-well-data.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var plateLayOutWidget = plateLayOutWidget || {};
(function($, fabric) {
plateLayOutWidget.applyWellData = function() {
// This object adds all the data fields and unit data to all the tiles/wells
return {
// these methodes can be combined but leave it as it is for simplicity
_addWellDataToAll: function() {
// Here we are adding an object containing all the id s of fields in the right to tiles
var noOfTiles = this.allTiles.length;
for(var tileRunner = 0; tileRunner < noOfTiles; tileRunner ++) {
this.allTiles[tileRunner]["wellData"] = $.extend(true, {}, this.allWellData);
}
},
_addUnitDataToAll: function() {
// Here we are adding an object containing all the id s of units in the right to tiles
var noOfTiles = this.allTiles.length;
for(var tileRunner = 0; tileRunner < noOfTiles; tileRunner ++) {
this.allTiles[tileRunner]["unitData"] = $.extend(true, {}, this.allUnitData);
}
},
};
}
})(jQuery, fabric)