mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 20:58:15 +00:00
[Plot] Begin adding WebGL fallback
Begin adding code to handle case where WebGL context is lost, WTD-475.
This commit is contained in:
@ -155,6 +155,15 @@ define(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fallbackFromWebGL() {
|
||||||
|
element.html(TEMPLATE);
|
||||||
|
canvas = element.find("canvas")[0];
|
||||||
|
chart = getChart([Canvas2DChart], canvas);
|
||||||
|
if (chart) {
|
||||||
|
doDraw(scope.draw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Try to initialize a chart.
|
// Try to initialize a chart.
|
||||||
chart = getChart([GLChart, Canvas2DChart], canvas);
|
chart = getChart([GLChart, Canvas2DChart], canvas);
|
||||||
|
|
||||||
@ -192,4 +201,4 @@ define(
|
|||||||
|
|
||||||
return MCTChart;
|
return MCTChart;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user