|
|
@ -88,8 +88,6 @@ function ButtonNavigator (_parent, _traceManager) { |
|
|
|
this.view |
|
|
|
this.view |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
module.exports = ButtonNavigator |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ButtonNavigator.prototype.render = function () { |
|
|
|
ButtonNavigator.prototype.render = function () { |
|
|
|
var self = this |
|
|
|
var self = this |
|
|
|
var view = yo`<div class="${css.buttons}">
|
|
|
|
var view = yo`<div class="${css.buttons}">
|
|
|
@ -130,29 +128,43 @@ ButtonNavigator.prototype.reset = function () { |
|
|
|
resetWarning(this) |
|
|
|
resetWarning(this) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ButtonNavigator.prototype.stepChanged = function (step) { |
|
|
|
ButtonNavigator.prototype.stepChanged = function (stepState, jumpOutDisabled) { |
|
|
|
|
|
|
|
if (stepState === 'invalid') { |
|
|
|
|
|
|
|
// TODO: probably not necessary, already implicit done in the next steps
|
|
|
|
|
|
|
|
this.reset() |
|
|
|
|
|
|
|
this.updateAll() |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.intoBackDisabled = (stepState === 'initial') |
|
|
|
|
|
|
|
this.overBackDisabled = (stepState === 'initial') |
|
|
|
|
|
|
|
this.jumpPreviousBreakpointDisabled = (stepState === 'initial') |
|
|
|
|
|
|
|
this.jumpNextBreakpointDisabled = (stepState === 'end') |
|
|
|
|
|
|
|
this.intoForwardDisabled = (stepState === 'end') |
|
|
|
|
|
|
|
this.overForwardDisabled = (stepState === 'end') |
|
|
|
|
|
|
|
this.jumpNextBreakpointDisabled = jumpOutDisabled |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.updateAll() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ButtonNavigator.prototype.old_stepChanged = function (step) { |
|
|
|
|
|
|
|
var self = this |
|
|
|
this.intoBackDisabled = step <= 0 |
|
|
|
this.intoBackDisabled = step <= 0 |
|
|
|
this.overBackDisabled = step <= 0 |
|
|
|
this.overBackDisabled = step <= 0 |
|
|
|
if (!this.traceManager) { |
|
|
|
this.traceManager.getLength(function (error, length) { |
|
|
|
this.intoForwardDisabled = true |
|
|
|
if (error) { |
|
|
|
this.overForwardDisabled = true |
|
|
|
console.log(error) |
|
|
|
} else { |
|
|
|
self.reset() |
|
|
|
var self = this |
|
|
|
} else { |
|
|
|
this.traceManager.getLength(function (error, length) { |
|
|
|
self.jumpNextBreakpointDisabled = step >= length - 1 |
|
|
|
if (error) { |
|
|
|
self.jumpPreviousBreakpointDisabled = step <= 0 |
|
|
|
self.reset() |
|
|
|
self.intoForwardDisabled = step >= length - 1 |
|
|
|
console.log(error) |
|
|
|
self.overForwardDisabled = step >= length - 1 |
|
|
|
} else { |
|
|
|
var stepOut = self.traceManager.findStepOut(step) |
|
|
|
self.jumpNextBreakpointDisabled = step >= length - 1 |
|
|
|
self.jumpOutDisabled = stepOut === step |
|
|
|
self.jumpPreviousBreakpointDisabled = step <= 0 |
|
|
|
} |
|
|
|
self.intoForwardDisabled = step >= length - 1 |
|
|
|
self.updateAll() |
|
|
|
self.overForwardDisabled = step >= length - 1 |
|
|
|
}) |
|
|
|
var stepOut = self.traceManager.findStepOut(step) |
|
|
|
|
|
|
|
self.jumpOutDisabled = stepOut === step |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
self.updateAll() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.updateAll() |
|
|
|
this.updateAll() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|