[Plot] Begin adding WebGL fallback

Begin adding code to handle case where WebGL context
is lost, WTD-475.
This commit is contained in:
Victor Woeltjen 2015-06-19 15:47:22 -07:00
parent dbd7a65a7a
commit dac44623ee

View File

@ -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.
chart = getChart([GLChart, Canvas2DChart], canvas);
@ -192,4 +201,4 @@ define(
return MCTChart;
}
);
);