Add (back) heartbeat to debug toolbar

webgl-renderer
cpsdqs 7 years ago
parent ef4c867007
commit ed59b0cb44
Signed by untrusted user: cpsdqs
GPG Key ID: 3F59586BB7448DD1
  1. 14
      js/term/debug.js
  2. 6
      sass/pages/_term.scss

@ -431,8 +431,22 @@ module.exports = function attachDebugger (screen, connection) {
toolbar.appendChild(table)
}
let heartbeat = toolbarNodes.heartbeat = document.createElement('div')
heartbeat.classList.add('heartbeat')
heartbeat.textContent = '❤'
toolbar.appendChild(heartbeat)
}
connection.on('heartbeat', () => {
if (screenAttached && toolbarNodes.heartbeat) {
toolbarNodes.heartbeat.classList.remove('beat')
window.requestAnimationFrame(() => {
toolbarNodes.heartbeat.classList.add('beat')
})
}
})
updateToolbar = function () {
initToolbar()

@ -190,12 +190,6 @@ body.term {
}
}
.toolbar-buttons {
button {
margin-right: 5px;
}
}
.heartbeat {
float: right;
font-family: $font-stack;

Loading…
Cancel
Save