How do I divide RGraph.common.core.js into 2 files?


« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Dennis on 9th April 2014
Dear Everyone,
How to divide RGraph.common.core.js file into 2 files.
I saw following function for most of the file, I need to divide into 2:
// Module pattern
(function (win, doc, undefined)
{
...
// End module pattern
})(window, document);
My Embedded application only accept a file with size below 32 kbytes.
Thanks in advance,
Dennis
Posted by Richard on 9th April 2014
Hi there,

Thats the Module pattern - you need to leave that in place. You can take out functions which are inside that one - for example:

RG.Background.draw =
RG.background.draw =
RG.background.Draw = function (obj)
{
     // ...
}




Richard
Posted by Dennis on 9th April 2014
Hi Richard,
I'll remove some function which not related to gauge graph.

Just for information, I being able to divide the file into 2 files.
I divide the fie at:
RG.removeCustomEventListener=RG.RemoveCustomEventListener=function(obj,i)

In file #1 add following at the end of the file
})(window,document);

In file #2 add following at the beginning of the file
'RGraph=window.RGraph||{isRGraph:true};(function(win,doc,undefined)
{var RG=RGraph,ua=navigator.userAgent,ma=Math;

Dennis

Add a reply




« Back to message list