Merge branch 'develop' into random-orgs
This commit is contained in:
@@ -93,6 +93,10 @@ class EditorController extends CanvasController{
|
||||
$('#move-range-edit').change ( function() {
|
||||
this.env.organism.move_range = parseInt($('#move-range-edit').val());
|
||||
}.bind(this));
|
||||
|
||||
$('#mutation-rate-edit').change ( function() {
|
||||
this.env.organism.mutability = parseInt($('#mutation-rate-edit').val());
|
||||
}.bind(this));
|
||||
$('#observation-type-edit').change ( function() {
|
||||
this.setBrainEditorValues($('#observation-type-edit').val());
|
||||
this.setBrainDetails();
|
||||
@@ -111,6 +115,13 @@ class EditorController extends CanvasController{
|
||||
$('#randomize-organism-details').css('display', 'none');
|
||||
}
|
||||
|
||||
refreshDetailsPanel() {
|
||||
if (this.mode === Modes.Edit)
|
||||
this.setEditorPanel();
|
||||
else
|
||||
this.setDetailsPanel();
|
||||
}
|
||||
|
||||
setDetailsPanel() {
|
||||
this.clearDetailsPanel();
|
||||
var org = this.env.organism;
|
||||
@@ -118,7 +129,8 @@ class EditorController extends CanvasController{
|
||||
$('.cell-count').text("Cell count: "+org.anatomy.cells.length);
|
||||
$('#move-range').text("Move Range: "+org.move_range);
|
||||
$('#mutation-rate').text("Mutation Rate: "+org.mutability);
|
||||
if (Hyperparams.useGlobalMutability) {
|
||||
|
||||
if (Hyperparams.useGlobalMutability) {
|
||||
$('#mutation-rate').css('display', 'none');
|
||||
}
|
||||
else {
|
||||
@@ -142,6 +154,14 @@ class EditorController extends CanvasController{
|
||||
if (this.setMoveRangeVisibility()){
|
||||
$('#move-range-edit').val(org.move_range);
|
||||
}
|
||||
|
||||
$('#mutation-rate-edit').val(org.mutability);
|
||||
if (Hyperparams.useGlobalMutability) {
|
||||
$('#mutation-rate-cont').css('display', 'none');
|
||||
}
|
||||
else {
|
||||
$('#mutation-rate-cont').css('display', 'block');
|
||||
}
|
||||
|
||||
if (this.setBrainPanelVisibility()){
|
||||
this.setBrainEditorValues($('#observation-type-edit').val());
|
||||
|
||||
Reference in New Issue
Block a user