Skip to content

Commit

Permalink
Same change in PolygonOutlineGeometry
Browse files Browse the repository at this point in the history
  • Loading branch information
hpinkos committed Apr 26, 2016
1 parent 1a1fe9a commit b3daf58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/Core/PolygonOutlineGeometry.js
Expand Up @@ -289,6 +289,9 @@ define([
if (!defined(options) || !defined(options.polygonHierarchy)) {
throw new DeveloperError('options.polygonHierarchy is required.');
}
if (defined(options.perPositionHeight) && options.perPositionHeight && defined(options.height)) {
throw new DeveloperError('Cannot use both options.perPositionHeight and options.height');
}
//>>includeEnd('debug');

var polygonHierarchy = options.polygonHierarchy;
Expand Down
9 changes: 9 additions & 0 deletions Specs/Core/PolygonOutlineGeometrySpec.js
Expand Up @@ -21,6 +21,15 @@ defineSuite([
}).toThrowDeveloperError();
});

it('throws with height when perPositionHeight is true', function() {
expect(function() {
return new PolygonOutlineGeometry({
height: 30,
perPositionHeight: true
});
}).toThrowDeveloperError();
});

it('throws without positions', function() {
expect(function() {
return PolygonOutlineGeometry.fromPositions();
Expand Down

0 comments on commit b3daf58

Please sign in to comment.