Skip to content

Commit 6f38171

Browse files
author
David Lohle
authored
Merge pull request #41 from TheVindicators/coord_updates
coordinate updates
2 parents 7827261 + d983e59 commit 6f38171

File tree

3 files changed

+79
-32
lines changed

3 files changed

+79
-32
lines changed

app/static/js/Editor.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,9 @@ Editor.prototype = {
696696
z_max = geo.scale.z * z_max;
697697
z_min = geo.scale.z * z_min;
698698

699-
699+
var scale = z_max - z_min;
700+
var newPos = new THREE.Vector3( scale , scale/2, scale );
701+
this.execute( new SetPositionCommand( this.camera, newPos ) );
700702

701703
},
702704

app/static/js/Sidebar.Object.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Sidebar.Object = function ( editor ) {
116116
objectRotationRow.add( new UI.Text( 'Rotation' ).setWidth( '90px' ) );
117117
objectRotationRow.add( objectRotationZ, objectRotationX, objectRotationY );
118118

119-
container.add( objectRotationRow );
119+
//container.add( objectRotationRow );
120120

121121
// scale
122122

@@ -130,7 +130,7 @@ Sidebar.Object = function ( editor ) {
130130
//objectScaleRow.add( objectScaleLock );
131131
objectScaleRow.add( objectScaleZ, objectScaleX, objectScaleY ); // swap y and z axis
132132

133-
container.add( objectScaleRow );
133+
//container.add( objectScaleRow );
134134

135135
// fov
136136

app/templates/editor.html

Lines changed: 74 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,60 @@
44
<title>Vis - Web Visualizer</title>
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
7+
<style>
8+
.modal {
9+
display: none; /* Hidden by default */
10+
position: fixed; /* Stay in place */
11+
z-index: 1; /* Sit on top */
12+
left: 0;
13+
top: 0;
14+
width: 100%; /* Full width */
15+
height: 100%; /* Full height */
16+
overflow: auto; /* Enable scroll if needed */
17+
background-color: rgb(0,0,0); /* Fallback color */
18+
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
19+
}
20+
.modal-content {
21+
margin: 15% auto; /* 15% from the top and centered */
22+
padding: 20px;
23+
width: 20%; /* Could be more or less, depending on screen size */
24+
}
25+
.modal-content {
26+
text-decoration: none;
27+
}
28+
.popup {
29+
display: block;
30+
position: fixed;
31+
z-index: 1;
32+
padding-top: 100px;
33+
left: 0;
34+
top: 0;
35+
width: 100%;
36+
height: 100%;
37+
overflow: auto;
38+
background-color: rgb(0,0,0);
39+
background-color: rgba(0,0,0,0.4);
40+
}
41+
.popup-content {
42+
background-color: #fefefe;
43+
margin: auto;
44+
padding: 20px;
45+
border: 1px solid #888;
46+
width: 675px;
47+
}
48+
.close-win {
49+
color: #aaaaaa;
50+
float: right;
51+
font-size: 28px;
52+
font-weight: bold;
53+
}
54+
.close-win:hover,
55+
.close-win:focus {
56+
color: #000;
57+
text-decoration: none;
58+
cursor: pointer;
59+
}
60+
</style>
761
</head>
862
<body ontouchstart="">
963
<link href="/static/css/bootstrap.min.css" rel="stylesheet" />
@@ -155,32 +209,6 @@
155209
<script src="/static/js/libs/html2canvas.js"></script>
156210
<script src="/static/js/libs/three.html.js"></script>
157211

158-
<style>
159-
/* The Modal (background) */
160-
.modal {
161-
display: none; /* Hidden by default */
162-
position: fixed; /* Stay in place */
163-
z-index: 1; /* Sit on top */
164-
left: 0;
165-
top: 0;
166-
width: 100%; /* Full width */
167-
height: 100%; /* Full height */
168-
overflow: auto; /* Enable scroll if needed */
169-
background-color: rgb(0,0,0, 0); /* Fallback color */
170-
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
171-
}
172-
173-
/* Modal Content/Box */
174-
.modal-content {
175-
margin: 15% auto; /* 15% from the top and centered */
176-
padding: 20px;
177-
width: 20%; /* Could be more or less, depending on screen size */
178-
}
179-
180-
.modal-content a{
181-
text-decoration: none;
182-
}
183-
</style>
184212

185213
<script>
186214

@@ -467,10 +495,27 @@
467495
<div id="saves" class="list-group">
468496

469497
</div>
470-
471498
</div>
472-
473-
499+
</div>
500+
<!--
501+
<div id="readme" class="popup">
502+
<div class="popup-content">
503+
<span class="close-win">&times;</span>
504+
<h2>Hello, and Welcome to Vis: Web Visualizer!</h2>
505+
<p>Please read the following information before continuing:</p>
506+
<ul>
507+
<li>To load a previous session, click on File -> Load, then select from the popup box</li>
508+
<li>To import a model, go to File -> Import</li>
509+
<li>Once imported, adjust the aircraft dimensions on the right to match that of your selected model</li>
510+
<li>To add an antenna, click on Add -> Antenna and then enter in the desired starting coordinates</li>
511+
<li>To start a new visualization, press File -> New</li>
512+
<li>When an object is selected, you can adjust various characteristics from 'Object' menu on the sidebar</li>
513+
<li>You may also move an antenna along any axis by moving the axis arrows once it's selected</li>
514+
</ul>
515+
<p>If you do notice any issues with the application, please let us know on our github page. Enjoy!</p>
516+
</div>
517+
</div>
518+
-->
474519
</div>
475520
</body>
476521
</html>

0 commit comments

Comments
 (0)