(e)
| 106 | } |
| 107 | |
| 108 | onPlayClicked (e) { |
| 109 | this.clearPlayback() |
| 110 | for (let child of Array.from(this.$el.find('#event-container').children())) { |
| 111 | child = $(child) |
| 112 | child.data('timeout', 0) |
| 113 | } |
| 114 | let percent = this.$el.find('#slider')[0].value / 100 |
| 115 | if (percent === 1) { |
| 116 | this.$el.find('#slider')[0].value = 0 |
| 117 | percent = 0 |
| 118 | } |
| 119 | this.spade.play(this.options.events, this.ace, percent, event => { |
| 120 | const name = event.eventName |
| 121 | const elem = this.$el.find(`.${name}`) |
| 122 | if (!elem) { |
| 123 | console.warn('Unknown eventName:', name) |
| 124 | return |
| 125 | } |
| 126 | elem.css('background-color', 'rgba(100, 255, 100, 0.5)') |
| 127 | return elem.data('timeout', 100) |
| 128 | }) |
| 129 | this.interval = setInterval(this.updateSlider, 1) |
| 130 | return this.fun() |
| 131 | } |
| 132 | |
| 133 | fun () { |
| 134 | if ((this.spade.speed === 8) && this.spade.playback) { |
nothing calls this directly
no test coverage detected