Skip to content

Commit

Permalink
website update
Browse files Browse the repository at this point in the history
  • Loading branch information
gka committed Mar 22, 2013
1 parent 5bd0efb commit af9a5ea
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 9 deletions.
34 changes: 28 additions & 6 deletions js/kartograph.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


(function() {
var $, Aitoff, Azimuthal, BBox, Balthasart, Behrmann, BlurFilter, Bubble, CEA, CantersModifiedSinusoidalI, Circle, CohenSutherland, Conic, Cylindrical, EckertIV, EquidistantAzimuthal, Equirectangular, Filter, GallPeters, GlowFilter, GoodeHomolosine, Hatano, HoboDyer, HtmlLabel, Icon, Kartograph, LAEA, LCC, LabeledBubble, LatLon, Line, LinearScale, LogScale, LonLat, Loximuthal, MapLayer, MapLayerPath, Mercator, Mollweide, NaturalEarth, Nicolosi, Orthographic, Path, PieChart, Proj, PseudoConic, PseudoCylindrical, QuantileScale, REbraces, REcomment_string, REfull, REmunged, Robinson, Satellite, Scale, Sinusoidal, SqrtScale, StackedBarChart, Stereographic, SvgLabel, Symbol, SymbolGroup, View, WagnerIV, WagnerV, Winkel3, drawPieChart, filter, kartograph, log, map_layer_path_uid, munge, munged, parsedeclarations, resolve, restore, root, uid, warn, __point_in_polygon, __proj, __type, _base, _base1, _ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref2, _ref20, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9,
var $, Aitoff, Azimuthal, BBox, Balthasart, Behrmann, BlurFilter, Bubble, CEA, CantersModifiedSinusoidalI, Circle, CohenSutherland, Conic, Cylindrical, EckertIV, EquidistantAzimuthal, Equirectangular, Filter, GallPeters, GlowFilter, GoodeHomolosine, Hatano, HoboDyer, HtmlLabel, Icon, Kartograph, LAEA, LCC, LabeledBubble, LatLon, Line, LinearScale, LogScale, LonLat, Loximuthal, MapLayer, MapLayerPath, Mercator, Mollweide, NaturalEarth, Nicolosi, Orthographic, Path, PieChart, Proj, PseudoConic, PseudoCylindrical, QuantileScale, REbraces, REcomment_string, REfull, REmunged, Robinson, Satellite, Scale, Sinusoidal, SqrtScale, StackedBarChart, Stereographic, SvgLabel, Symbol, SymbolGroup, View, WagnerIV, WagnerV, Winkel3, drawPieChart, filter, hex2rgb, kartograph, log, map_layer_path_uid, munge, munged, parsedeclarations, resolve, restore, root, uid, warn, __point_in_polygon, __proj, __type, _base, _base1, _ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref2, _ref20, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
Expand Down Expand Up @@ -617,7 +617,10 @@
}
}
if (opts.tooltips != null) {
return layer.tooltips(opts.tooltips);
layer.tooltips(opts.tooltips);
}
if (opts.done != null) {
return opts.done();
}
};
if (opts.chunks != null) {
Expand Down Expand Up @@ -3900,6 +3903,26 @@

filter.blur = BlurFilter;

hex2rgb = function(hex) {
var b, g, r, u;

if (hex.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)) {
if (hex.length === 4 || hex.length === 7) {
hex = hex.substr(1);
}
if (hex.length === 3) {
hex = hex.split("");
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
}
u = parseInt(hex, 16);
r = u >> 16;
g = u >> 8 & 0xFF;
b = u & 0xFF;
[r, g, b];
}
throw 'unknown color format';
};

GlowFilter = (function(_super) {
__extends(GlowFilter, _super);

Expand All @@ -3913,16 +3936,15 @@


GlowFilter.prototype.buildFilter = function(fltr) {
var alpha, blur, color, inner, knockout, me, rgb, strength, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22;
var alpha, blur, inner, knockout, me, rgb, strength, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22;

me = this;
blur = (_ref17 = me.params.blur) != null ? _ref17 : 4;
strength = (_ref18 = me.params.strength) != null ? _ref18 : 1;
color = (_ref19 = me.params.color) != null ? _ref19 : '#D1BEB0';
rgb = (_ref19 = me.params.color) != null ? _ref19 : '#D1BEB0';
if (typeof color === 'string') {
color = chroma.hex(color);
rgb = hex2rgb(rgb);
}
rgb = color.rgb;
inner = (_ref20 = me.params.inner) != null ? _ref20 : false;
knockout = (_ref21 = me.params.knockout) != null ? _ref21 : false;
alpha = (_ref22 = me.params.alpha) != null ? _ref22 : 1;
Expand Down
Loading

0 comments on commit af9a5ea

Please sign in to comment.