Commit ab541b00 authored by yann300's avatar yann300

add play

parent 5a935612
...@@ -11,6 +11,7 @@ function ButtonNavigator (_parent, _traceManager) { ...@@ -11,6 +11,7 @@ function ButtonNavigator (_parent, _traceManager) {
this.intoForwardDisabled = true this.intoForwardDisabled = true
this.overForwardDisabled = true this.overForwardDisabled = true
this.jumpOutDisabled = true this.jumpOutDisabled = true
this.playDisabled = true
this.traceManager = _traceManager this.traceManager = _traceManager
this.currentCall = null this.currentCall = null
...@@ -68,6 +69,8 @@ ButtonNavigator.prototype.render = function () { ...@@ -68,6 +69,8 @@ ButtonNavigator.prototype.render = function () {
</button> </button>
<button id='jumpout' title='jump out' class='fa fa-share' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('jumpOut') }} disabled=${this.jumpOutDisabled} > <button id='jumpout' title='jump out' class='fa fa-share' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('jumpOut') }} disabled=${this.jumpOutDisabled} >
</button> </button>
<button id='play' title='play' class='fa fa-play' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('play') }} disabled=${this.playDisabled} >
</button>
<div id='reverted' style="display:none"> <div id='reverted' style="display:none">
<button id='jumptoexception' title='jump to exception' class='fa fa-exclamation-triangle' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('jumpToException', [self.revertionPoint]) }} disabled=${this.jumpOutDisabled} > <button id='jumptoexception' title='jump to exception' class='fa fa-exclamation-triangle' style=${ui.formatCss(style.button)} onclick=${function () { self.event.trigger('jumpToException', [self.revertionPoint]) }} disabled=${this.jumpOutDisabled} >
</button> </button>
...@@ -104,6 +107,7 @@ ButtonNavigator.prototype.stepChanged = function (step) { ...@@ -104,6 +107,7 @@ ButtonNavigator.prototype.stepChanged = function (step) {
self.reset() self.reset()
console.log(error) console.log(error)
} else { } else {
self.playDisabled = step >= length - 1
self.intoForwardDisabled = step >= length - 1 self.intoForwardDisabled = step >= length - 1
self.overForwardDisabled = step >= length - 1 self.overForwardDisabled = step >= length - 1
var stepOut = self.traceManager.findStepOut(step) var stepOut = self.traceManager.findStepOut(step)
...@@ -122,6 +126,7 @@ ButtonNavigator.prototype.updateAll = function () { ...@@ -122,6 +126,7 @@ ButtonNavigator.prototype.updateAll = function () {
this.updateDisabled('intoforward', this.intoForwardDisabled) this.updateDisabled('intoforward', this.intoForwardDisabled)
this.updateDisabled('jumpout', this.jumpOutDisabled) this.updateDisabled('jumpout', this.jumpOutDisabled)
this.updateDisabled('jumptoexception', this.jumpOutDisabled) this.updateDisabled('jumptoexception', this.jumpOutDisabled)
this.updateDisabled('play', this.playDisabled)
} }
ButtonNavigator.prototype.updateDisabled = function (id, disabled) { ButtonNavigator.prototype.updateDisabled = function (id, disabled) {
......
...@@ -60,6 +60,11 @@ function StepManager (_parent, _traceManager) { ...@@ -60,6 +60,11 @@ function StepManager (_parent, _traceManager) {
this.buttonNavigator.event.register('jumpToException', this, function (exceptionIndex) { this.buttonNavigator.event.register('jumpToException', this, function (exceptionIndex) {
self.jumpTo(exceptionIndex) self.jumpTo(exceptionIndex)
}) })
this.buttonNavigator.event.register('play', (exceptionIndex) => {
if (self.parent.breakpointManager) {
self.parent.breakpointManager.play()
}
})
} }
StepManager.prototype.resolveToReducedTrace = function (value, incr) { StepManager.prototype.resolveToReducedTrace = function (value, incr) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment