Skip to content

Commit

Permalink
bumped version
Browse files Browse the repository at this point in the history
  • Loading branch information
gka committed Aug 2, 2013
1 parent 9417f81 commit 9fe9d9d
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 19 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
### 0.7.1

* changed namespace to kartograph (lowercase)
* fixed glow filter
* added possibility to render layers in separate svg doc

### 0.6.7

* fixed HTML labels

### 0.6.6

* fixed satellite projection
* fixed satellite projection
35 changes: 21 additions & 14 deletions kartograph.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

kartograph = root.$K = (_ref = root.kartograph) != null ? _ref : root.kartograph = {};

kartograph.version = "0.6.6";
kartograph.version = "0.7.1";

$ = root.jQuery;

Expand Down Expand Up @@ -540,7 +540,7 @@
};

Kartograph.prototype.addLayer = function(id, opts) {
var $paths, chunkSize, iter, layer, layer_id, me, moveOn, nextPaths, path_id, rows, src_id, svgLayer, titles, _ref4, _ref5, _ref6;
var $paths, chunkSize, iter, layer, layer_id, layer_paper, me, moveOn, nextPaths, path_id, rows, src_id, svgLayer, titles, _ref4, _ref5, _ref6;

if (opts == null) {
opts = {};
Expand All @@ -567,14 +567,18 @@
} else {
opts = {};
}
layer_paper = me.paper;
if (opts.add_svg_layer) {
layer_paper = me.createSVGLayer();
}
if (layer_id == null) {
layer_id = src_id;
}
svgLayer = $('#' + src_id, me.svgSrc);
if (svgLayer.length === 0) {
return;
}
layer = new MapLayer(layer_id, path_id, me, opts.filter);
layer = new MapLayer(layer_id, path_id, me, opts.filter, layer_paper);
$paths = $('*', svgLayer[0]);
rows = $paths.length;
chunkSize = (_ref6 = opts.chunks) != null ? _ref6 : rows;
Expand Down Expand Up @@ -1035,13 +1039,13 @@


MapLayer = (function() {
function MapLayer(layer_id, path_id, map, filter) {
function MapLayer(layer_id, path_id, map, filter, paper) {
var me;

me = this;
me.id = layer_id;
me.path_id = path_id;
me.paper = map.paper;
me.paper = paper != null ? paper : map.paper;
me.view = map.viewBC;
me.map = map;
me.filter = filter;
Expand All @@ -1054,7 +1058,7 @@
if ((_ref4 = me.paths) == null) {
me.paths = [];
}
layerPath = new MapLayerPath(svg_path, me.id, me.map, titles);
layerPath = new MapLayerPath(svg_path, me.id, me, titles);
if (__type(me.filter) === 'function') {
if (me.filter(layerPath.data) === false) {
layerPath.remove();
Expand Down Expand Up @@ -1337,15 +1341,17 @@


MapLayerPath = (function() {
function MapLayerPath(svg_path, layer_id, map, titles) {
var attr, data, i, me, paper, path, title, uid, v, view, vn, _i, _ref4;
function MapLayerPath(svg_path, layer_id, layer, titles) {
var attr, data, i, map, me, paper, path, title, uid, v, view, vn, _i, _ref4;

me = this;
paper = map.paper;
paper = layer.paper;
map = layer.map;
view = map.viewBC;
me.path = path = kartograph.geom.Path.fromSVG(svg_path);
me.vpath = view.projectPath(path);
me.svgPath = me.vpath.toSVG(paper);
me.svgPath.data('path', me);
if (map.styles == null) {
if (Raphael.svg) {
me.svgPath.node.setAttribute('class', layer_id);
Expand Down Expand Up @@ -5548,7 +5554,7 @@ function kdtree() {
me = this;
HtmlLabel.__super__.constructor.call(this, opts);
me.text = (_ref21 = opts.text) != null ? _ref21 : '';
me.style = (_ref22 = opts.style) != null ? _ref22 : '';
me.css = (_ref22 = opts.css) != null ? _ref22 : '';
me["class"] = (_ref23 = opts["class"]) != null ? _ref23 : '';
}

Expand All @@ -5558,9 +5564,9 @@ function kdtree() {
me = this;
l = $('<div>' + me.text + '</div>');
l.css({
width: '50px',
width: '80px',
position: 'absolute',
left: '-25px',
left: '-40px',
'text-align': 'center'
});
me.lbl = lbl = $('<div class="label" />');
Expand All @@ -5578,11 +5584,12 @@ function kdtree() {
var me;

me = this;
return me.lbl.css({
me.lbl.css({
position: 'absolute',
left: me.x + 'px',
top: me.y + 'px'
});
return me.lbl.css(me.css);
};

HtmlLabel.prototype.clear = function() {
Expand All @@ -5604,7 +5611,7 @@ function kdtree() {

})(kartograph.Symbol);

HtmlLabel.props = ['text', 'style', 'class'];
HtmlLabel.props = ['text', 'css', 'class'];

HtmlLabel.layers = [
{
Expand Down
4 changes: 2 additions & 2 deletions kartograph.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name" : "kartograph-js",
"description" : "JavaScript library for SVG mapping",
"version" : "0.6.6",
"version" : "0.7.1",
"author" : "Gregor Aisch",
"homepage" : "http://kartograph.org",
"keywords" : ["svg", "map", "raphael"],
Expand Down
2 changes: 1 addition & 1 deletion src/core.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

root = (exports ? this)
kartograph = root.$K = root.kartograph ?= {}
kartograph.version = "0.6.6"
kartograph.version = "0.7.1"

$ = root.jQuery

Expand Down

0 comments on commit 9fe9d9d

Please sign in to comment.