* Returns the picking color of currenlty selected object of the given 'layer'. * @return {Array} - the picking color or null if layers selected object is invalid.
(layer)
| 45325 | |
| 45326 | |
| 45327 | function getObjectHighlightParameters(layer) { |
| 45328 | // TODO - inefficient to update settings every render? |
| 45329 | // TODO: Add warning if 'highlightedObjectIndex' is > numberOfInstances of the model. |
| 45330 | var _layer$props = layer.props, |
| 45331 | highlightedObjectIndex = _layer$props.highlightedObjectIndex, |
| 45332 | highlightColor = _layer$props.highlightColor; |
| 45333 | var parameters = { |
| 45334 | pickingHighlightColor: [highlightColor[0], highlightColor[1], highlightColor[2], highlightColor[3] || 255] |
| 45335 | }; // Update picking module settings if highlightedObjectIndex is set. |
| 45336 | // This will overwrite any settings from auto highlighting. |
| 45337 | |
| 45338 | if (Number.isInteger(highlightedObjectIndex)) { |
| 45339 | parameters.pickingSelectedColor = highlightedObjectIndex >= 0 ? layer.encodePickingColor(highlightedObjectIndex) : null; |
| 45340 | } |
| 45341 | |
| 45342 | return parameters; |
| 45343 | } |
| 45344 | },{"luma.gl/constants":"zLGf","luma.gl":"iiNl","../utils/log":"mqAj","../utils/assert":"R2tg"}],"uOUz":[function(require,module,exports) { |
| 45345 | "use strict"; |
| 45346 |
no outgoing calls
no test coverage detected