Unverified Commit 3457133a authored by User expired's avatar User expired
Browse files

fixed some javascript issues

parent 2554ec4e
Upcoming version:
-----------------
- fixed some javascript issues (Nikolaus Krismer)
- fixing problem with marker-number in combination with webpack (Nikolaus Krismer)
- improved error messages (Nikolaus Krismer)
- fixed hill shading and meanCalculator (skewness part) (Nikolaus Krismer)
......
......@@ -358,14 +358,12 @@ define(['jquery', 'leaflet', 'evispa-timo-jsclipper', 'util/loggingUtils', 'isoc
* @method MeanCalculator#calculateSkenewssStats
*/
function calculateSkenewssStats(dateArr, nrIsochrones, firstDate, lastDate) {
var aSkewness = 0,
delta = 0,
var delta = 0,
deltas = [],
// same as delta but shifted by a step size and extended by (arbitrary) values at the beginning and end (in order to always be able to compute a standard deviation when only one value is available)
deltas2 = [],
maxSkewness = 0,
result = {},
stepSize;
stepSize,
tFirst = firstDate.getTime(),
tLast = lastDate.getTime();
......@@ -468,6 +466,9 @@ define(['jquery', 'leaflet', 'evispa-timo-jsclipper', 'util/loggingUtils', 'isoc
calcMode = dlg.find('#mode').val(),
calcMean = (calcMode === 'mean' || calcMode === 'meanAndSkewness'),
calcSkewness = (calcMode === 'skewness' || calcMode === 'meanAndSkewness'),
geoJsonBorderline = null,
geoJsonFrequency = null,
geoJsonSkewness = null,
intersectedIsochrones = calculateIntersectedIsochrones(calcMean, calcSkewness),
step = 1 / intersectedIsochrones.count,
tmp = 0;
......@@ -482,9 +483,6 @@ define(['jquery', 'leaflet', 'evispa-timo-jsclipper', 'util/loggingUtils', 'isoc
});
// add layers to map (skewness first, so on initial add the mean isochrone border is visible)
geoJsonBorderline = null;
geoJsonFrequency = null;
geoJsonSkewness = null;
layers = {};
if (intersectedIsochrones.skewness) {
logger.log('Showing time invariant isochrone');
......
......@@ -77,7 +77,7 @@ define(['jquery', 'leaflet', 'util/loggingUtils', 'isochrone/configuration', 'is
e = null,
eEnd = $('#mean-calculator-dialog #dateTime-end'),
eStart = $('#mean-calculator-dialog #dateTime-start'),
valueEnd = eEnd.datepicker('getDate');
valueEnd = eEnd.datepicker('getDate'),
valueStart = eStart.datepicker('getDate');
if (valueStart == null) {
......
......@@ -9,11 +9,11 @@ define(['leaflet'], function(L) {
createIcon : function() {
var div = document.createElement('div'),
numdiv = document.createElement('div');
options = this.options;
numdiv = document.createElement('div'),
options = this.options;
numdiv.setAttribute('class', 'number');
numdiv.innerHTML = this.options['number'] || '';
numdiv.innerHTML = options['number'] || '';
div.innerHTML = options.html !== false ? options.html : '';
div.appendChild(numdiv);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment