Skip to content
Snippets Groups Projects
Commit 398cd3ba authored by legac's avatar legac
Browse files

Polish the plugin pGridMathJax.

parent e351ed62
No related branches found
No related tags found
No related merge requests found
......@@ -47,17 +47,30 @@ Ext.define('App.grid.plugin.MathJax', {
"use strict";
var grid = this.getCmp(),
domEl = Ext.getDom(grid.getEl());
domEl = Ext.getDom(grid.getView().getEl());
// mask the grid durinf MathJax processing
/**
* Call at the end of the MathJax processing.
* Remove the mask on the grid and hide the progress bar
*
* @param {App.grid.Panel} wdg
*/
function endOfTask (wdg) {
wdg.unmask();
Ext.Msg.hide();
}
// mask the grid during MathJax processing and show a progress bar
grid.mask();
Ext.Msg.show({
wait: true,
waitConfig: {
text: 'processing symbols'}
});
// push in the queue the mathjax processing
// followed by unlasking the grid
// push in the MatJax queue the processing
// followed by the unmasking
MathJax.Hub.Queue(["Typeset", MathJax.Hub, domEl]);
MathJax.Hub.Queue([function (widget) {
"use strict";
widget.unmask();
}, grid])
MathJax.Hub.Queue([endOfTask, grid]);
}
});
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment