Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
If you are drawing something to a group or a panel using an onDraw() function, you can use this function to refresh the graphics of this panel on demand.
function RefreshPanel(panelObj) {
try {
if (!panelObj) {
// no panel or group passed to function
return false;
}
if (!panelObj.size) {
// size property of the panelObj wasn't found?
return false;
}
var s = panelObj.size;
panelObj.size = [s[0], s[1] + 1];
panelObj.size = [s[0], s[1]];
} catch (e) {
// something went wrong, you could print or alert an error here
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment