File tree Expand file tree Collapse file tree 4 files changed +18
-32
lines changed
Expand file tree Collapse file tree 4 files changed +18
-32
lines changed Original file line number Diff line number Diff line change @@ -94,35 +94,13 @@ ISOTerminal.addEventListener('init', function(){
9494 this . send ( this . prompt )
9595 } , 100 )
9696 } ,
97- keyHandler : function ( ch ) {
98- let erase = false
99- // if( ch == '\x7F' ){
100- // ch = "\b \b" // why does write() not just support \x7F ?
101- // erase = true
102- // }
97+ keyHandler : function ( ch ) {
10398 this . send ( ch )
104- const reset = ( ) => {
105- this . console = ""
106- setTimeout ( ( ) => {
107- if ( this . boot . menu . selected ) this . send ( this . prompt )
108- } , 100 )
109- }
110- if ( ( ch == "\n" || ch == "\r" ) ) {
111- try {
112- this . send ( "\n\r" )
113- if ( this . console ) eval ( this . console )
114- reset ( )
115- } catch ( e ) {
116- reset ( )
117- throw e // re throw
118- }
119- } else {
120- if ( erase ) {
121- this . console = this . console . split ( '' ) . slice ( 0 , - 1 ) . join ( '' )
122- } else {
123- this . console += ch
124- }
125- }
99+ } ,
100+ cmdHandler : function ( cmd ) {
101+ this . send ( "\n\r" )
102+ eval ( cmd )
103+ setTimeout ( ( ) => this . send ( this . prompt ) , 10 ) // because worker vs terminal
126104 }
127105 }
128106 )
Original file line number Diff line number Diff line change @@ -78,15 +78,18 @@ ISOTerminal.prototype.TermInit = function(){
7878 erase = true
7979 }
8080 if ( this . boot . menu . selected ) {
81+ this . boot . menu . selected . keyHandler . call ( this , ch )
8182 if ( isEnter ) {
82- this . boot . menu . selected . cmdHandler . call ( this , this . lastCmd )
83+ if ( this . boot . menu . selected . cmdHandler ) {
84+ this . boot . menu . selected . cmdHandler . call ( this , this . lastCmd )
85+ }
8386 this . lastCmd = ""
8487 }
85- else this . boot . menu . selected . keyHandler . call ( this , ch )
8688 } else if ( isEnter ) {
8789 let menuitem = this . boot . menu . find ( ( m ) => m . key == this . lastChar )
8890 if ( menuitem ) {
8991 this . boot . menu . selected = menuitem
92+ this . lastCmd = ""
9093 menuitem . init . call ( this , ( ) => {
9194 this . term . write ( "\n\r" )
9295 this . bootMenu ( )
Original file line number Diff line number Diff line change 1+
2+ ;
13( function ( three ) {
24 'use strict' ;
35
676678 } ) ;
677679
678680} ) ( THREE ) ;
679- //# sourceMappingURL=aframe-html.js.map
681+
682+
Original file line number Diff line number Diff line change @@ -116,9 +116,11 @@ AFRAME.registerComponent('window', {
116116} )
117117
118118AFRAME . utils . positionObjectNextToNeighbor = function positionObjectNextToNeighbor ( object , lastNeighbor = null , margin ) {
119+ if ( lastNeighbor == null || object == null ) return
119120 // *FIXME* this could be more sophisticated :)
120121 object . position . x = lastNeighbor . position . x + margin
121122 object . position . y = lastNeighbor . position . y - margin
122123 object . position . z = lastNeighbor . position . z + margin
123-
124124}
125+
126+
You can’t perform that action at this time.
0 commit comments