From ebbf967749b03f58874bcb487345719731b88b9c Mon Sep 17 00:00:00 2001 From: Marcus Fedarko Date: Sat, 23 May 2020 00:20:51 -0700 Subject: [PATCH] ENH: Add initial "display mode" btn #753 --- emperor/support_files/js/controller.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/emperor/support_files/js/controller.js b/emperor/support_files/js/controller.js index d9e56417..a83b6615 100644 --- a/emperor/support_files/js/controller.js +++ b/emperor/support_files/js/controller.js @@ -266,6 +266,24 @@ define([ }); this.$plotSpace.append(this.$optionsButton); + /** + * @type {Node} + * jQuery object + */ + this.$displayModeButton = $(''); + 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(); @@ -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();