Commit 6f54f8c3 authored by amandaghassaei's avatar amandaghassaei

photo setup

parent e8433669
......@@ -261,7 +261,7 @@ input.intInput, input.floatInput{
}
.dropdown-submenu li:hover{
background-color: #428bca!important;
background-color: #aaa!important;
}
.dropdown-submenu>.dropdown-menu {
......
This diff is collapsed.
......@@ -94,6 +94,8 @@
<a tabindex="-1">Amanda<span class="pull-right fui-arrow-right"></span></a>
<ul class="dropdown-menu">
<li><a id="videoRendering" href="#">Video Rendering Setup</a></li>
<li><a id="photoSetup" href="#">Photo Setup</a></li>
<li><a id="undoPhotoSetup" href="#">Undo Photo Setup</a></li>
</ul>
</li>
<!--<li class="dropdown-submenu">-->
......
......@@ -3,8 +3,8 @@
*/
define(['jquery', 'underscore', 'backbone', 'fileSaver', 'navViewMenu', 'appState', 'plist'],
function($, _, Backbone, fileSaver, NavViewMenu, appState, plist){
define(['jquery', 'underscore', 'backbone', 'fileSaver', 'navViewMenu', 'appState', 'plist', 'threeModel'],
function($, _, Backbone, fileSaver, NavViewMenu, appState, plist, three){
return Backbone.View.extend({
......@@ -27,7 +27,9 @@ define(['jquery', 'underscore', 'backbone', 'fileSaver', 'navViewMenu', 'appStat
"click .jsonFile": "_loadJSON",
"click #viewMenuDropdown": "_renderViewMenu",
"click #videoRendering": "_videoRenderingSetup"
"click #videoRendering": "_videoRenderingSetup",
"click #photoSetup": "_photoSetup",
"click #undoPhotoSetup": "_undoPhotoSetup"
},
initialize: function(){
......@@ -111,6 +113,26 @@ define(['jquery', 'underscore', 'backbone', 'fileSaver', 'navViewMenu', 'appStat
window.resizeTo(1000, 700);//todo this doesn't work
},
_photoSetup: function(e){
e.preventDefault();
appState.hideAllUi();
var navSelection = appState.get("currentNav");
if (plist.allMenus[navSelection].parentNav) navSelection = plist.allMenus[navSelection].parentNav;
if (plist.allMenus[navSelection].parent) navSelection = plist.allMenus[navSelection].parent;
if (navSelection != "navSim") appState.set("basePlaneIsVisible", false);
appState.set("highlighterIsVisible", false);
three.setBackgroundColor(0xffffff);
},
_undoPhotoSetup: function(e){
e.preventDefault();
appState.set("menuIsVisible", true);
appState.set("ribbonIsVisible", true);
appState.set("basePlaneIsVisible", true);
if (appState.get("currentNav") == "navDesign") appState.set("highlighterIsVisible", true);
three.setBackgroundColor(0xcccccc);
},
_save: function(e){
......
......@@ -197,6 +197,13 @@ define(['underscore', 'backbone', 'threeModel', 'three', 'plist', 'globals'],
three.resetCameraPosition();
},
hideAllUi: function(){
this.set("menuIsVisible", false);
this.set("ribbonIsVisible", false);
this.set("consoleIsVisible", false);
this.set("scriptIsVisible", false);
},
openAssembly: function(){
this.set("currentNav", "navDesign");
$("#jsonInput").click();
......
......@@ -261,6 +261,10 @@ define(['underscore', 'three'], function(_, THREE){
return renderer.context;
}
function setBackgroundColor(color){
renderer.setClearColor(color, 1);
}
return {//return public properties/methods
render: render,
conditionalRender: conditionalRender,
......@@ -290,7 +294,8 @@ define(['underscore', 'three'], function(_, THREE){
resetCameraPosition: resetCameraPosition,
setThreeView: setThreeView,
saveSVG: saveSVG,
getGLContext: getGLContext
getGLContext: getGLContext,
setBackgroundColor: setBackgroundColor
}
});
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment