Skip to content

Commit

Permalink
fix #1457 circle clipping bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ansis committed Sep 3, 2015
1 parent 1ae7962 commit 91d2e0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions js/data/circle_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ function CircleBucket(buffers) {
}

CircleBucket.prototype.addFeatures = function() {
var extent = 4096;
for (var i = 0; i < this.features.length; i++) {
var geometries = this.features[i].loadGeometry()[0];
for (var j = 0; j < geometries.length; j++) {
this.elementGroups.makeRoomFor(6);
var x = geometries[j].x,
y = geometries[j].y;

// Do not include points that are outside the tile boundaries.
if (x < 0 || x >= extent || y < 0 || y >= extent) continue;

var idx = this.buffers.circleVertex.index -
this.elementGroups.current.vertexStartIndex;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"documentation": "git+https://github.com/documentationjs/documentation#d341019b32a8a257a93bd55586e7f09f42e29341",
"eslint": "^0.22.1",
"istanbul": "^0.3.15",
"mapbox-gl-test-suite": "git+https://github.com/mapbox/mapbox-gl-test-suite.git#6cfd7eb20de77018a7f10770f56df9ce1f8a76ac",
"mapbox-gl-test-suite": "git+https://github.com/mapbox/mapbox-gl-test-suite.git#2004426964b2ff74c231eae00c69c1e7fc73a329",
"prova": "^2.1.2",
"sinon": "^1.15.4",
"through": "^2.3.7",
Expand Down

0 comments on commit 91d2e0e

Please sign in to comment.