Skip to content

Commit

Permalink
Merge pull request #3898 from AnalyticalGraphicsInc/ie-2d
Browse files Browse the repository at this point in the history
Fix 2D in IE/Edge
  • Loading branch information
mramato committed May 9, 2016
2 parents 0dbb960 + f290ca5 commit 36eb270
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Change Log
* Deprecated
*
* Improved KML NetworkLink compatibility by supporting the `Url` tag. [#3895](https://github.com/AnalyticalGraphicsInc/cesium/pull/3895).
* Fixed exaggerated terrain tiles disappearing. [#3676](https://github.com/AnalyticalGraphicsInc/cesium/issues/3676)
* Fixed infinite horizontal 2D scrolling in IE/Edge. [#3893](https://github.com/AnalyticalGraphicsInc/cesium/issues/3893)

### 1.21 - 2016-05-02

Expand All @@ -22,7 +24,6 @@ Change Log
* Fixed issue causing the fog to go dark and the atmosphere to flicker when the camera clips the globe. [#3178](https://github.com/AnalyticalGraphicsInc/cesium/issues/3178)
* Fixed a bug that caused an exception and rendering to stop when using `ArcGisMapServerImageryProvider` to connect to a MapServer specifying the Web Mercator projection and a fullExtent bigger than the valid extent of the projection. [#3854](https://github.com/AnalyticalGraphicsInc/cesium/pull/3854)
* Fixed issue causing an exception when switching scene modes with an active KML network link. [#3865](https://github.com/AnalyticalGraphicsInc/cesium/issues/3865)
* Fixed exaggerated terrain tiles disappearing. [#3676](https://github.com/AnalyticalGraphicsInc/cesium/issues/3676)

### 1.20 - 2016-04-01

Expand Down
21 changes: 12 additions & 9 deletions Source/Scene/Scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -1763,37 +1763,40 @@ define([
} else if (windowCoordinates.x > context.drawingBufferWidth * 0.5) {
viewport.width = windowCoordinates.x;

var right = camera.frustum.right;
camera.frustum.right = maxCoord.x - x;

executeCommandsInViewport(true, scene, passState, backgroundColor, picking);

viewport.x += windowCoordinates.x;
viewport.width = context.drawingBufferWidth - windowCoordinates.x;

camera.position.x = -camera.position.x;

var right = camera.frustum.right;
camera.frustum.right = -camera.frustum.left;
camera.frustum.left = -right;
camera.frustum.left = -camera.frustum.right;
camera.frustum.right = camera.frustum.left + (right - camera.frustum.right);

frameState.cullingVolume = camera.frustum.computeCullingVolume(camera.positionWC, camera.directionWC, camera.upWC);
context.uniformState.update(frameState);

executeCommandsInViewport(false, scene, passState, backgroundColor, picking);
} else {
viewport.x += windowCoordinates.x;
viewport.width -= windowCoordinates.x;
viewport.x = windowCoordinates.x;
viewport.width = context.drawingBufferWidth - windowCoordinates.x;

var left = camera.frustum.left;
camera.frustum.left = -maxCoord.x - x;

executeCommandsInViewport(true, scene, passState, backgroundColor, picking);

viewport.x = viewport.x - viewport.width;
viewport.x = 0;
viewport.width = windowCoordinates.x;

camera.position.x = -camera.position.x;

var left = camera.frustum.left;
camera.frustum.left = -camera.frustum.right;
camera.frustum.right = -left;
camera.frustum.right = -camera.frustum.left;
camera.frustum.left = camera.frustum.right + (left - camera.frustum.left);


frameState.cullingVolume = camera.frustum.computeCullingVolume(camera.positionWC, camera.directionWC, camera.upWC);
context.uniformState.update(frameState);
Expand Down

0 comments on commit 36eb270

Please sign in to comment.