Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tmp1 = Math.sqrt(Math.cos(phi1 / 180 * pi)) + 2 * n * Math.sin(phi1 / 180 * pi);
tmp2 = scale * Math.pow(tmp1 - 2 * n * Math.sin(midLat / 180 * pi),0.5) / n;
tmp3 = n * (lng - midLng);
p = scale * Math.pow(tmp1 - 2 * n * Math.sin(lat / 180 * pi),0.5) / n;
x = p * Math.sin(tmp3 / 180 * pi);
y = tmp2 - p * Math.cos(tmp3 / 180 * pi);
return([x,y])
}
}
map.draw();
return map;
};
Raphael.el.darken = function(increment) {
hsl = Raphael.rgb2hsl(this.attr('fill'));
var newLightness = (hsl.l - increment <= 0) ? 0 : (hsl.l - increment);
this.attr({fill: "hsl("+ hsl.h +","+hsl.s+","+newLightness+")"});
}
Raphael.el.lighten = function(increment) {
hsl = Raphael.rgb2hsl(this.attr('fill'));
var newLightness = (hsl.l + increment >= 1) ? 1 : (hsl.l + increment);
this.attr({fill: "hsl("+ hsl.h +","+hsl.s+","+newLightness+")"});
}
this.gauge.level.animate = function(attrs, refreshAnimationTime, refreshAnimationType) {
if (attrs.fill) {
attrs.stroke = attrs.fill;
attrs.fill = 'rgba(0,0,0,0)';
}
return Raphael.el.animate.call(tbGauge.gauge.level, attrs, refreshAnimationTime, refreshAnimationType);
}
return([x,y])
}
}
map.draw();
return map;
};
Raphael.el.darken = function(increment) {
hsl = Raphael.rgb2hsl(this.attr('fill'));
var newLightness = (hsl.l - increment <= 0) ? 0 : (hsl.l - increment);
this.attr({fill: "hsl("+ hsl.h +","+hsl.s+","+newLightness+")"});
}
Raphael.el.lighten = function(increment) {
hsl = Raphael.rgb2hsl(this.attr('fill'));
var newLightness = (hsl.l + increment >= 1) ? 1 : (hsl.l + increment);
this.attr({fill: "hsl("+ hsl.h +","+hsl.s+","+newLightness+")"});
}