CumulusUtils Runtime Library: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
 
(2 intermediate revisions by the same user not shown)
The library is intended to be used when CUtils is used in a modular fashion. Any other use is not supported. When using modules which require javascript to function properly (e.g. the Graphs modules) cumulusutils.js must be included in the users webpage using the following HTML code:
<script src='lib/cumulusutils.js'></script>
 
And following the note above:
<script src='https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js'></script>
 
And for using the sun and moon discs:
<script src='https://cdnjs.cloudflare.com/ajax/libs/d3/5.15.1/d3.min.js'></script>"
<script src='lib/suncalc.js'></script>
 
== Globals ==
''$(function () {<arguments>} )''
 
At load time this function is called automatically - so it is h ere just for information, no user call is required - and initialises the library by calling the following functions:
#''loadRealtimeTxt'' => initializes the loading of ''realtime.txt'' and distributes the values over the dashboard
#''RT_timer = setInterval(loadRealtimeTxt, 30 * 1000);'' => Initialize the interval timer for reading realtime.txt (see below)
#''CreateSun'' and ''CreateMoon'' => Creates the sun and moon disc
#''MinuteFunctions'' => initializes the minute function which takes care of the chart refreshes and the moving of the sun disc hand.
#''HourFunctions'' => initialisezinitializes the hour functions which takes care of the moondisc updates
#''LoadUtilsReport'' => It calls the initial report to load
 

Navigation menu