fix canvas fallback in plots

https://github.com/nasa/openmct/pull/4784
This commit is contained in:
David Tsay 2022-01-26 14:27:33 -08:00
parent 6e2437b09e
commit ceddadcac6

View File

@ -278,7 +278,7 @@ export default {
// Have to throw away the old canvas elements and replace with new
// canvas elements in order to get new drawing contexts.
const div = document.createElement('div');
div.innerHTML = this.TEMPLATE;
div.innerHTML = this.canvasTemplate + this.canvasTemplate;
const mainCanvas = div.querySelectorAll("canvas")[1];
const overlayCanvas = div.querySelectorAll("canvas")[0];
this.canvas.parentNode.replaceChild(mainCanvas, this.canvas);