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

uber / deck.gl / 14011

20 Sep 2019 - 23:54 coverage increased (+2.7%) to 82.999%
14011

Pull #3672

travis-ci-com

9181eb84f9c35729a3bad740fb7f9d93?size=18&default=identiconweb-flow
bump loaders.gl version
Pull Request #3672: Fix bugs in pre-bundled version

3393 of 4577 branches covered (74.13%)

Branch coverage included in aggregate %.

7157 of 8134 relevant lines covered (87.99%)

4305.9 hits per line

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

83.87
/modules/core/src/lib/layer-extension.js
1
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
//
3
// Permission is hereby granted, free of charge, to any person obtaining a copy
4
// of this software and associated documentation files (the "Software"), to deal
5
// in the Software without restriction, including without limitation the rights
6
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
// copies of the Software, and to permit persons to whom the Software is
8
// furnished to do so, subject to the following conditions:
9
//
10
// The above copyright notice and this permission notice shall be included in
11
// all copies or substantial portions of the Software.
12
//
13
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
// THE SOFTWARE.
20
import {deepEqual} from '../utils/deep-equal';
21

22
export class LayerExtension {
23
  constructor(opts = {}) {
24
    this.opts = opts;
1×
25
  }
26

27
  equals(extension) {
28
    if (this === extension) {
Branches [[1, 0]] missed. 3×
29
      return true;
1×
30
    }
31

32
    return this.constructor === extension.constructor && deepEqual(this.opts, extension.opts);
1×
33
  }
34

35
  getShaders(extension) {
36
    return null;
10×
37
  }
38

39
  getSubLayerProps(extension) {
40
    const {defaultProps = {}} = extension.constructor;
Branches [[3, 0]] missed. 3×
UNCOV
41
    const newProps = {
!
42
      updateTriggers: {}
43
    };
44

45
    /* eslint-disable max-depth */
46
    for (const key in defaultProps) {
3×
UNCOV
47
      if (key in this.props) {
Branches [[4, 1]] missed. !
48
        const propDef = defaultProps[key];
2×
49
        const propValue = this.props[key];
2×
50
        newProps[key] = propValue;
2×
51
        if (propDef && propDef.type === 'accessor') {
4×
52
          newProps.updateTriggers[key] = this.props.updateTriggers[key];
4×
53
          if (typeof propValue === 'function') {
4×
54
            newProps[key] = this.getSubLayerAccessor(propValue, true);
4×
55
          }
56
        }
57
      }
58
    }
59
    /* eslint-enable max-depth */
60
    return newProps;
4×
61
  }
62

63
  initializeState(context, extension) {}
64

65
  updateState(params, extension) {}
66

67
  finalizeState(extension) {}
68
}
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