Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
DMDesign
Commits
b1368c1b
Commit
b1368c1b
authored
Sep 11, 2015
by
Amanda Ghassaei
Browse files
eod
parent
37ec6011
Changes
7
Hide whitespace changes
Inline
Side-by-side
js/menus/MenuWrapperView.js
View file @
b1368c1b
...
...
@@ -46,9 +46,18 @@ define(['jquery', 'underscore', 'plist', 'backbone', 'lattice', 'appState', 'tex
}
if
(
$
(
"
.floatInput
"
).
is
(
"
:focus
"
))
this
.
_updateFloat
(
e
);
if
(
$
(
"
.intInput
"
).
is
(
"
:focus
"
))
this
.
_updateInt
(
e
);
if
(
$
(
"
.textInput
"
).
is
(
"
:focus
"
))
this
.
_updateString
(
e
);
if
(
$
(
"
.hexInput
"
).
is
(
"
:focus
"
))
this
.
_updateHex
(
e
);
else
if
(
$
(
"
.intInput
"
).
is
(
"
:focus
"
))
this
.
_updateInt
(
e
);
else
if
(
$
(
"
.textInput
"
).
is
(
"
:focus
"
))
this
.
_updateString
(
e
);
else
if
(
$
(
"
.hexInput
"
).
is
(
"
:focus
"
))
this
.
_updateHex
(
e
);
else
if
(
!
$
(
"
input
"
).
is
(
"
:focus
"
)
&&
e
.
keyCode
==
77
&&
(
e
.
ctrlKey
||
e
.
metaKey
)
&&
e
.
shiftKey
&&
appState
.
get
(
"
currentNav
"
)
==
"
navComm
"
){
e
.
preventDefault
();
require
([
'
serialComm
'
],
function
(
serialComm
){
serialComm
.
openSerialMonitor
();
});
}
console
.
log
(
e
);
},
_updateString
:
function
(
e
){
...
...
js/menus/SendMenuView.js
View file @
b1368c1b
...
...
@@ -2,10 +2,10 @@
* Created by aghassaei on 3/11/15.
*/
define
([
'
jquery
'
,
'
underscore
'
,
'
comm
Parent
Menu
'
,
'
serialComm
'
,
'
commPlist
'
,
'
text!sendMenuTemplate
'
,
'
cam
'
,
'
camPlist
'
],
function
(
$
,
_
,
Comm
Parent
Menu
,
serialComm
,
commPlist
,
template
,
cam
,
camPlist
){
define
([
'
jquery
'
,
'
underscore
'
,
'
menu
Parent
'
,
'
serialComm
'
,
'
commPlist
'
,
'
text!sendMenuTemplate
'
,
'
cam
'
,
'
camPlist
'
],
function
(
$
,
_
,
Menu
Parent
,
serialComm
,
commPlist
,
template
,
cam
,
camPlist
){
return
Comm
Parent
Menu
.
extend
({
return
Menu
Parent
.
extend
({
events
:
{
...
...
js/menus/SetupCommMenuView.js
View file @
b1368c1b
...
...
@@ -17,7 +17,6 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'text!setupCommM
"
click #openSerialMonitor
"
:
"
_openSerialMonitor
"
},
__initialize
:
function
(){
},
...
...
js/menus/templates/NavViewMenu.html
View file @
b1368c1b
...
...
@@ -3,7 +3,7 @@
<ul
class=
"dropdown-menu"
>
<li><a
class=
"appState boolProperty"
data-property=
"menuIsVisible"
href=
"#"
>
Menu
</a></li>
<li><a
class=
"appState boolProperty"
data-property=
"scriptIsVisible"
href=
"#"
>
Script
</a></li>
<li><a
class=
"appState boolProperty"
data-property=
"consoleIsVisible"
href=
"#"
>
Console
</a></li>
<!--
<li><a class="appState boolProperty" data-property="consoleIsVisible" href="#">Console</a></li>
-->
<li><a
class=
"appState boolProperty"
data-property=
"ribbonIsVisible"
href=
"#"
>
Ribbon
</a></li>
</ul>
</li>
...
...
js/menus/templates/SendMenuView.html
View file @
b1368c1b
...
...
@@ -9,8 +9,6 @@
<a
href=
"#"
id=
"streamCommands"
class=
"btn btn-block btn-lg btn-success"
>
Stream
</a>
<
%
}
%
>
<br/>
Incoming:
<pre
id=
"incomingSerialMessage"
><
%=
lastMessageReceived
%
></pre><br/><br/>
Out:
<input
id=
"sendSerialMessage"
value=
""
placeholder=
"Send Message"
class=
"seventyFiveWidth form-control unresponsiveInput"
type=
"text"
><br/><br/>
Next Line:
<input
id=
"nextLine"
value=
""
placeholder=
"##"
class=
"intInput form-control unresponsiveInput"
type=
"text"
>
<a
href=
"#"
id=
"previousLineButton"
class=
"btn btn-lg btn-default"
>
Prev
</a>
<a
href=
"#"
id=
"nextLineButton"
class=
"btn btn-lg btn-default"
>
Next
</a><br/><br/>
...
...
js/models/AppState.js
View file @
b1368c1b
...
...
@@ -25,7 +25,7 @@ define(['underscore', 'backbone', 'threeModel', 'three', 'plist', 'globals'], fu
basePlaneIsVisible
:
true
,
highlighterIsVisible
:
true
,
axesAreVisible
:
false
,
focusOnLattice
:
tru
e
,
focusOnLattice
:
fals
e
,
//key bindings
shift
:
false
,
...
...
js/models/SerialComm.js
View file @
b1368c1b
...
...
@@ -53,6 +53,10 @@ define(['underscore', 'backbone', 'socketio'], function(_, Backbone, io){
},
openSerialMonitor
:
function
(){
if
(
!
this
.
get
(
"
connected
"
))
{
console
.
warn
(
"
can't open serial monitor if not connected to node server
"
);
return
;
}
require
([
'
serialMonitorController
'
],
function
(
serialMonitorController
){
serialMonitorController
.
open
();
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment