Skip to content

Commit

Permalink
Merge pull request #943 from OpenGeoscience/skip-geom-compute-bounds
Browse files Browse the repository at this point in the history
Skip having vgl compute geometry bounds.
  • Loading branch information
manthey authored Oct 30, 2018
2 parents 1a84741 + 4acf0c5 commit 4cec837
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gl/contourFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ var gl_contourFeature = function (arg) {
geom.addSource(sourceValues);
geom.addSource(sourceOpacity);
geom.addPrimitive(primitive);
/* We don't need vgl to comptue bounds, so make the geo.computeBounds just
* set them to 0. */
geom.computeBounds = function () {
geom.setBounds(0, 0, 0, 0, 0, 0);
};
m_mapper.setGeometryData(geom);
};

Expand Down
5 changes: 5 additions & 0 deletions src/gl/lineFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,11 @@ var gl_lineFeature = function (arg) {
geom.addSource(strkOpacityData);
geom.addSource(flagsData);
geom.addPrimitive(triangles);
/* We don't need vgl to comptue bounds, so make the geo.computeBounds just
* set them to 0. */
geom.computeBounds = function () {
geom.setBounds(0, 0, 0, 0, 0, 0);
};
m_mapper.setGeometryData(geom);
return m_this;
};
Expand Down
5 changes: 5 additions & 0 deletions src/gl/pointFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,11 @@ var gl_pointFeature = function (arg) {
geom.addSource(sourceAlpha);
geom.addSource(sourceStrokeOpacity);
geom.addPrimitive(primitive);
/* We don't need vgl to comptue bounds, so make the geo.computeBounds just
* set them to 0. */
geom.computeBounds = function () {
geom.setBounds(0, 0, 0, 0, 0, 0);
};
m_mapper.setGeometryData(geom);
};

Expand Down
5 changes: 5 additions & 0 deletions src/gl/polygonFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,11 @@ var gl_polygonFeature = function (arg) {
geom.addSource(sourceFillColor);
geom.addSource(sourceFillOpacity);
geom.addPrimitive(trianglePrimitive);
/* We don't need vgl to comptue bounds, so make the geo.computeBounds just
* set them to 0. */
geom.computeBounds = function () {
geom.setBounds(0, 0, 0, 0, 0, 0);
};
m_mapper.setGeometryData(geom);

s_init.call(m_this, arg);
Expand Down

0 comments on commit 4cec837

Please sign in to comment.