Skip to content

Commit

Permalink
Merge 19bceff into c3db3e2
Browse files Browse the repository at this point in the history
  • Loading branch information
raiyni committed Nov 30, 2017
2 parents c3db3e2 + 19bceff commit ee7a94e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ol/renderer/canvas/vectorlayer.js
Expand Up @@ -181,11 +181,11 @@ ol.renderer.canvas.VectorLayer.prototype.composeFrame = function(frameState, lay
ol.render.canvas.rotateAtOffset(replayContext, -rotation,
width / 2, height / 2);
replayGroup.replay(replayContext, transform, rotation, skippedFeatureUids);
if (vectorSource.getWrapX() && projection.canWrapX() &&
!ol.extent.containsExtent(projectionExtent, extent)) {
if (vectorSource.getWrapX() && projection.canWrapX()) {
var startX = extent[0];
var worldWidth = ol.extent.getWidth(projectionExtent);
var world = 0;
startX -= worldWidth;
var offsetX;
while (startX < projectionExtent[0]) {
--world;
Expand All @@ -196,6 +196,7 @@ ol.renderer.canvas.VectorLayer.prototype.composeFrame = function(frameState, lay
}
world = 0;
startX = extent[2];
startX += worldWidth;
while (startX > projectionExtent[2]) {
++world;
offsetX = worldWidth * world;
Expand Down Expand Up @@ -325,8 +326,7 @@ ol.renderer.canvas.VectorLayer.prototype.prepareFrame = function(frameState, lay
vectorLayerRenderBuffer * resolution);
var projectionExtent = viewState.projection.getExtent();

if (vectorSource.getWrapX() && viewState.projection.canWrapX() &&
!ol.extent.containsExtent(projectionExtent, frameState.extent)) {
if (vectorSource.getWrapX() && viewState.projection.canWrapX()) {
// For the replay group, we need an extent that intersects the real world
// (-180° to +180°). To support geometries in a coordinate range from -540°
// to +540°, we add at least 1 world width on each side of the projection
Expand Down

0 comments on commit ee7a94e

Please sign in to comment.