Merge pull request #68 from ngradwohl/bugfix/65_fix_loop
Bugfix/65 fix loop
This commit is contained in:
commit
bb6b4f15d8
@ -31,11 +31,23 @@ function Commander (ronin) {
|
||||
this.hide()
|
||||
}
|
||||
|
||||
|
||||
this._current_txt = ''
|
||||
|
||||
this.run = (txt = this._input.value) => {
|
||||
if (txt.indexOf('$') > -1) { ronin.log('Present: $'); return }
|
||||
this._current_txt = txt;
|
||||
|
||||
if ( ronin.always !== true ) {
|
||||
ronin.surface.maximize()
|
||||
ronin.interpreter.run(this._current_txt)
|
||||
}
|
||||
}
|
||||
|
||||
this.loop = () => {
|
||||
ronin.surface.maximize()
|
||||
ronin.interpreter.run(txt)
|
||||
ronin.always === true && requestAnimationFrame(() => this.run(txt))
|
||||
ronin.interpreter.run(this._current_txt)
|
||||
ronin.always === true && requestAnimationFrame(() => this.loop())
|
||||
}
|
||||
|
||||
this.load = function (txt) {
|
||||
|
@ -64,7 +64,7 @@ function Ronin () {
|
||||
this.animate = (b = true) => {
|
||||
if (this.always === b) { return }
|
||||
this.always = b
|
||||
this.commander.run()
|
||||
this.commander.loop()
|
||||
}
|
||||
|
||||
// Zoom
|
||||
|
Loading…
x
Reference in New Issue
Block a user