Skip to content

Commit

Permalink
ENH: Add initial "display mode" btn biocore#753
Browse files Browse the repository at this point in the history
  • Loading branch information
fedarko committed May 23, 2020
1 parent b959aed commit ebbf967
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions emperor/support_files/js/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,24 @@ define([
});
this.$plotSpace.append(this.$optionsButton);

/**
* @type {Node}
* jQuery object
*/
this.$displayModeButton = $('<button name="dm-button">&nbsp;</button>');
this.$displayModeButton.css({
'position': 'absolute',
'z-index': '3',
'top': '5px',
'right': '40px'
}).attr('title', 'Display Mode').on('click', function(event) {
scope.controllers.axes.updateVisibleAxes(null, 2);
scope.controllers.axes._colorChanged("axes-color", "#000000");
scope.controllers.axes._colorChanged("background-color", "#ffffff");
// TODO: show circles instead of spheres; fix axis labels
});
this.$plotSpace.append(this.$displayModeButton);

// default decomposition view uses the full window
this.addSceneView();

Expand All @@ -274,6 +292,9 @@ define([
scope.$optionsButton.button({text: false,
icons: {primary: ' ui-icon-gear'}});

scope.$displayModeButton.button({text: false,
icons: {primary: ' ui-icon-star'}});

scope._buildUI();
// Hide the loading splashscreen
scope.$divId.find('.loading').hide();
Expand Down

0 comments on commit ebbf967

Please sign in to comment.