Skip to content

Commit

Permalink
Merge pull request #6126 from AnalyticalGraphicsInc/vector-slice
Browse files Browse the repository at this point in the history
Fix IE tests broken by `slice`
  • Loading branch information
Hannah authored Jan 17, 2018
2 parents 3f4a499 + cbbf308 commit 6d9f55a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
6 changes: 4 additions & 2 deletions Source/Scene/Vector3DTilePoints.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
define([
'../Core/arraySlice',
'../Core/Cartesian2',
'../Core/Cartesian3',
'../Core/Color',
Expand All @@ -19,6 +20,7 @@ define([
'./PolylineCollection',
'./VerticalOrigin'
], function(
arraySlice,
Cartesian2,
Cartesian3,
Color,
Expand Down Expand Up @@ -158,8 +160,8 @@ define([

if (!defined(packedBuffer)) {
// Copy because they may be the views on the same buffer.
positions = points._positions = positions.slice();
points._batchIds = points._batchIds.slice();
positions = points._positions = arraySlice(positions);
points._batchIds = arraySlice(points._batchIds);

packedBuffer = points._packedBuffer = packBuffer(points, ellipsoid);
}
Expand Down
10 changes: 6 additions & 4 deletions Source/Scene/Vector3DTilePolygons.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
define([
'../Core/arraySlice',
'../Core/Cartesian3',
'../Core/Color',
'../Core/defaultValue',
Expand All @@ -16,6 +17,7 @@ define([
'./Vector3DTileBatch',
'./Vector3DTilePrimitive'
], function(
arraySlice,
Cartesian3,
Color,
defaultValue,
Expand Down Expand Up @@ -251,10 +253,10 @@ define([

if (!defined(batchTableColors)) {
// Copy because they may be the views on the same buffer.
positions = polygons._positions = polygons._positions.slice();
counts = polygons._counts = polygons._counts.slice();
indexCounts = polygons._indexCounts= polygons._indexCounts.slice();
indices = polygons._indices = polygons._indices.slice();
positions = polygons._positions = arraySlice(polygons._positions);
counts = polygons._counts = arraySlice(polygons._counts);
indexCounts = polygons._indexCounts= arraySlice(polygons._indexCounts);
indices = polygons._indices = arraySlice(polygons._indices);

polygons._center = polygons._ellipsoid.cartographicToCartesian(Rectangle.center(polygons._rectangle));

Expand Down
10 changes: 6 additions & 4 deletions Source/Scene/Vector3DTilePolylines.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
define([
'../Core/arraySlice',
'../Core/Cartesian3',
'../Core/Color',
'../Core/ComponentDatatype',
Expand All @@ -25,6 +26,7 @@ define([
'./BlendingState',
'./Cesium3DTileFeature'
], function(
arraySlice,
Cartesian3,
Color,
ComponentDatatype,
Expand Down Expand Up @@ -211,11 +213,11 @@ define([

if (!defined(packedBuffer)) {
// Copy because they may be the views on the same buffer.
positions = polylines._positions = positions.slice();
widths = polylines._widths = widths.slice();
counts = polylines._counts = counts.slice();
positions = polylines._positions = arraySlice(positions);
widths = polylines._widths = arraySlice(widths);
counts = polylines._counts = arraySlice(counts);

batchIds = polylines._transferrableBatchIds = polylines._batchIds.slice();
batchIds = polylines._transferrableBatchIds = arraySlice(polylines._batchIds);

packedBuffer = polylines._packedBuffer = packBuffer(polylines);
}
Expand Down

0 comments on commit 6d9f55a

Please sign in to comment.