Skip to content

Commit

Permalink
Merge pull request #2923 from AnalyticalGraphicsInc/polyGeo-perPosHeight
Browse files Browse the repository at this point in the history
Fix PolygonGeometry per position height extrusion
  • Loading branch information
mramato committed Aug 6, 2015
2 parents b7e4e26 + 446cfcd commit f230501
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Change Log
==========

### 1.13 - 2015-09-01

* Breaking changes
*
* Deprecated
*
* Fix issue where extruded `PolygonGeometry` was always extruding to the ellipsoid surface instead of specified height.


### 1.12 - 2015-08-03

* Breaking changes
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/PolygonGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,8 @@ define([
var perPositionHeight = defaultValue(options.perPositionHeight, false);

var extrudedHeight = options.extrudedHeight;
var extrude = (defined(extrudedHeight) && (!CesiumMath.equalsEpsilon(height, extrudedHeight, CesiumMath.EPSILON6) || perPositionHeight));
if (extrude) {
var extrude = defined(extrudedHeight);
if (extrude && !perPositionHeight) {
var h = extrudedHeight;
extrudedHeight = Math.min(h, height);
height = Math.max(h, height);
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/PolygonOutlineGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ define([
var perPositionHeight = defaultValue(options.perPositionHeight, false);

var extrudedHeight = options.extrudedHeight;
var extrude = (defined(extrudedHeight) && (!CesiumMath.equalsEpsilon(height, extrudedHeight, CesiumMath.EPSILON6) || perPositionHeight));
if (extrude) {
var extrude = defined(extrudedHeight);
if (extrude && !perPositionHeight) {
var h = extrudedHeight;
extrudedHeight = Math.min(h, height);
height = Math.max(h, height);
Expand Down

0 comments on commit f230501

Please sign in to comment.