From 6c2d9bccb78488dab5882b8ef440e20356ea5790 Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Sat, 17 Jan 2015 18:31:04 -0500 Subject: [PATCH] moving stuff around --- js/{views => menus}/elementMenu.js | 0 js/{views => menus}/exportMenu.js | 0 js/{views => menus}/importMenu.js | 0 js/{views => menus}/importView.js | 0 js/{views => menus}/navbar.js | 0 js/{views => threeViews}/fillGeometryView.js | 6 ++--- js/threeViews/pushPullMeshView.js | 25 ++++++++++++++++++++ js/{views => threeViews}/threeView.js | 0 main.html | 11 +++++---- 9 files changed, 33 insertions(+), 9 deletions(-) rename js/{views => menus}/elementMenu.js (100%) rename js/{views => menus}/exportMenu.js (100%) rename js/{views => menus}/importMenu.js (100%) rename js/{views => menus}/importView.js (100%) rename js/{views => menus}/navbar.js (100%) rename js/{views => threeViews}/fillGeometryView.js (84%) create mode 100644 js/threeViews/pushPullMeshView.js rename js/{views => threeViews}/threeView.js (100%) diff --git a/js/views/elementMenu.js b/js/menus/elementMenu.js similarity index 100% rename from js/views/elementMenu.js rename to js/menus/elementMenu.js diff --git a/js/views/exportMenu.js b/js/menus/exportMenu.js similarity index 100% rename from js/views/exportMenu.js rename to js/menus/exportMenu.js diff --git a/js/views/importMenu.js b/js/menus/importMenu.js similarity index 100% rename from js/views/importMenu.js rename to js/menus/importMenu.js diff --git a/js/views/importView.js b/js/menus/importView.js similarity index 100% rename from js/views/importView.js rename to js/menus/importView.js diff --git a/js/views/navbar.js b/js/menus/navbar.js similarity index 100% rename from js/views/navbar.js rename to js/menus/navbar.js diff --git a/js/views/fillGeometryView.js b/js/threeViews/fillGeometryView.js similarity index 84% rename from js/views/fillGeometryView.js rename to js/threeViews/fillGeometryView.js index df71d156..b7506d35 100644 --- a/js/views/fillGeometryView.js +++ b/js/threeViews/fillGeometryView.js @@ -3,16 +3,14 @@ */ -FillGeometryView = Backbone.View.extend({ +FillGeometryView = PushPullMeshView.extend({ events: { - - }, initialize: function(options){ - this.three = options.three; + PushPullMeshView.prototype.initialize.apply(this, arguments); //bind events this.listenTo(this.model, "change:geometry", this.replaceFillGeometry); diff --git a/js/threeViews/pushPullMeshView.js b/js/threeViews/pushPullMeshView.js new file mode 100644 index 00000000..a88a72e4 --- /dev/null +++ b/js/threeViews/pushPullMeshView.js @@ -0,0 +1,25 @@ +/** + * Created by aghassaei on 1/17/15. + */ + +//this is a parent class for other threeJS VCs that allows push and pull scale and orientation changes in the threeJS scene + +PushPullMeshView = Backbone.View.extend({ + + + events: { + }, + + initialize: function(options){ + + this.three = options.three; + + //bind events + + } +// +// render: function(){ +// this.three.render(); +// } + +}); \ No newline at end of file diff --git a/js/views/threeView.js b/js/threeViews/threeView.js similarity index 100% rename from js/views/threeView.js rename to js/threeViews/threeView.js diff --git a/main.html b/main.html index 746e828a..1a6d145c 100644 --- a/main.html +++ b/main.html @@ -45,17 +45,18 @@ <script src="js/models/lattice.js"></script> <!--views--> - <script src="js/views/threeView.js"></script> - <script src="js/views/importView.js"></script> - <script src="js/views/fillGeometryView.js"></script> + <script src="js/threeViews/threeView.js"></script> + <script src="js/threeViews/pushPullMeshView.js"></script> + <script src="js/menus/importView.js"></script> + <script src="js/threeViews/fillGeometryView.js"></script> <script src="js/main.js"></script> <!--<script src="js/views/importMenu.js"></script>--> <!--<script src="js/views/elementMenu.js"></script>--> - <script src="js/views/exportMenu.js"></script> - <script src="js/views/navbar.js"></script> + <script src="js/menus/exportMenu.js"></script> + <script src="js/menus/navbar.js"></script> <link rel="stylesheet" type="text/css" href="css/main.css"> </head> -- GitLab