Coveralls logob
Coveralls logo
  • Home
  • Features
  • Pricing
  • Docs
  • Sign In

uber / deck.gl / 13945

20 Sep 2019 - 0:32 coverage decreased (-2.9%) to 79.802%
13945

Pull #3655

travis-ci-com

9181eb84f9c35729a3bad740fb7f9d93?size=18&default=identiconweb-flow
Update layer.md
Pull Request #3655: Update pydeck layer docs

3399 of 4611 branches covered (73.72%)

Branch coverage included in aggregate %.

7024 of 8450 relevant lines covered (83.12%)

5682.28 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.59
/modules/core/src/passes/draw-layers-pass.js
1
import LayersPass from './layers-pass';
3×
2

3
export default class DrawLayersPass extends LayersPass {
4
  // PRIVATE
5
  getModuleParameters(layer, effects, effectProps) {
6
    const moduleParameters = super.getModuleParameters(layer);
738×
7
    Object.assign(moduleParameters, this.getObjectHighlightParameters(layer), effectProps);
738×
8
    for (const effect of effects) {
738×
9
      Object.assign(moduleParameters, effect.getParameters(layer));
9×
10
    }
11
    return moduleParameters;
738×
12
  }
13

14
  /**
15
   * Returns the picking color of currenlty selected object of the given 'layer'.
16
   * @return {Array} - the picking color or null if layers selected object is invalid.
17
   */
18
  getObjectHighlightParameters(layer) {
19
    // TODO - inefficient to update settings every render?
20
    // TODO: Add warning if 'highlightedObjectIndex' is > numberOfInstances of the model.
21
    const {highlightedObjectIndex, highlightColor} = layer.props;
738×
22
    const parameters = {
738×
23
      pickingHighlightColor: [
24
        highlightColor[0],
25
        highlightColor[1],
26
        highlightColor[2],
27
        highlightColor[3] || 255
Branches [[0, 1]] missed.
28
      ]
29
    };
30

31
    // Update picking module settings if highlightedObjectIndex is set.
32
    // This will overwrite any settings from auto highlighting.
33
    if (Number.isInteger(highlightedObjectIndex)) {
Branches [[1, 0]] missed. 738×
UNCOV
34
      parameters.pickingSelectedColor =
!
35
        highlightedObjectIndex >= 0 ? layer.encodePickingColor(highlightedObjectIndex) : null;
Branches [[2, 0], [2, 1]] missed.
36
    }
37
    return parameters;
738×
38
  }
39
}
Troubleshooting · Open an Issue · Sales · Support · ENTERPRISE · CAREERS · STATUS
BLOG · TWITTER · Legal & Privacy · Supported CI Services · What's a CI service? · Automated Testing

© 2019 Coveralls, LLC