Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 52: | Rivi 52: | ||
function loadObservations() { | function loadObservations() { | ||
var hc = 0; | var hc = 0; | ||
| Rivi 60: | Rivi 59: | ||
var id = el.attr( 'id' ); if ( typeof id == 'undefined' ) { id = 'jwsitegraph_' + Math.random() + '_container'; el.attr( 'id', id ); } | var id = el.attr( 'id' ); if ( typeof id == 'undefined' ) { id = 'jwsitegraph_' + Math.random() + '_container'; el.attr( 'id', id ); } | ||
if ( el.is( ':visible' ) && typeof window.jwobschart[id] == 'undefined' ) { | if ( el.is( ':visible' ) && typeof window.jwobschart[id] == 'undefined' ) { | ||
window.jwobschart[id] = {}; | window.jwobschart[id] = {}; | ||
| Rivi 343: | Rivi 338: | ||
so = { 'obscode': memo.obscodeParts[0], 'waterbody': memo.waterbody, 'startdate': memo.startDate, 'custom': custom }; | so = { 'obscode': memo.obscodeParts[0], 'waterbody': memo.waterbody, 'startdate': memo.startDate, 'custom': custom }; | ||
} | } | ||
memo.jw.loadObses( so, function( o ) { | memo.jw.loadObses( so, function( o ) { | ||
memo.obses = memo.jw.obs; | memo.obses = memo.jw.obs; | ||
| Rivi 365: | Rivi 358: | ||
if ( hc > 0 ) { | if ( hc > 0 ) { | ||
setTimeout( loadObservations, | setTimeout( loadObservations, 1000 ); | ||
} | } | ||
} | } | ||
| Rivi 373: | Rivi 365: | ||
function drawVisualization( memo ) { | function drawVisualization( memo ) { | ||
if ( typeof i18n[ memo.obscode ].direction != 'undefined' ) { memo.vaxisdir = i18n[ memo.obscode ].direction; } else { memo.vaxisdir = 1; } | if ( typeof i18n[ memo.obscode ].direction != 'undefined' ) { memo.vaxisdir = i18n[ memo.obscode ].direction; } else { memo.vaxisdir = 1; } | ||


