Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cc88320

Browse files
author
Samuel Vargas
committedJan 13, 2020
8261 - Avoid including Cesium3DTileFeature, fix imports
1 parent e269701 commit cc88320

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed
 

‎Source/Scene/Cesium3DTileFeature.js

+9
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ import defineProperties from '../Core/defineProperties.js';
4141
this._content = content;
4242
this._batchId = batchId;
4343
this._color = undefined; // for calling getColor
44+
45+
/**
46+
* NOTE: This property exists so that `Picking.js` can differentiate between
47+
* PrimitiveCollections and isCesium3DTileFeature objects without inflating
48+
* the size of the module via `instance of Cesium3DTileFeature`
49+
* @private
50+
*/
51+
52+
this.isCesium3DTileFeature = true;
4453
}
4554

4655
defineProperties(Cesium3DTileFeature.prototype, {

‎Source/Scene/Picking.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ import Ray from '../Core/Ray.js';
1717
import ShowGeometryInstanceAttribute from '../Core/ShowGeometryInstanceAttribute.js';
1818
import when from '../ThirdParty/when.js';
1919
import Camera from './Camera.js';
20-
import Cesium3DTileFeature from './Cesium3DTileFeature.js';
2120
import Cesium3DTilePass from './Cesium3DTilePass.js';
2221
import Cesium3DTilePassState from './Cesium3DTilePassState.js';
23-
import Cesium3DTileset from './Cesium3DTileset.js';
2422
import PickDepth from './PickDepth.js';
2523
import PrimitiveCollection from './PrimitiveCollection.js';
2624
import SceneMode from './SceneMode.js';
@@ -421,7 +419,7 @@ import View from './View.js';
421419
}
422420
}
423421

424-
if (object instanceof Cesium3DTileFeature) {
422+
if (defined(object.isCesium3DTileFeature)) {
425423
hasShowAttribute = true;
426424
object.show = false;
427425
pickedFeatures.push(object);

0 commit comments

Comments
 (0)
Please sign in to comment.