github
4769 of 5426 branches covered (87.89%)
Branch coverage included in aggregate %.
13 of 14 new or added lines in 3 files covered. (92.86%)
6854 existing lines in 152 files now uncovered.47062 of 58712 relevant lines covered (80.16%)
4938.11 hits per line
UNCOV
1
|
// deck.gl
|
|
UNCOV
2
|
// SPDX-License-Identifier: MIT
|
× |
UNCOV
3
|
// Copyright (c) vis.gl contributors
|
× |
UNCOV
4
|
|
× |
UNCOV
5
|
/* global document */
|
× |
UNCOV
6
|
|
× |
UNCOV
7
|
import {BOX_STYLE} from './component-css'; |
× |
UNCOV
8
|
|
× |
UNCOV
9
|
class DescriptionCard {
|
× |
UNCOV
10
|
constructor({container, props}) { |
× |
UNCOV
11
|
const {description} = props; |
× |
12 |
|
× |
13 |
const div = document.createElement('div');
|
× |
14 |
div.className = 'deck-json-description-box';
|
× |
15 |
Object.assign(div.style, BOX_STYLE); |
× |
16 |
this.el = div;
|
× |
17 |
|
× |
18 |
const textContainer = document.createElement('div');
|
× |
19 |
textContainer.innerHTML = description; |
× |
20 |
|
× |
21 |
div.appendChild(textContainer); |
× |
22 |
container.append(div); |
× |
23 |
} |
× |
24 |
|
× |
25 |
remove() { |
× |
26 |
this.el.remove();
|
× |
UNCOV
27
|
this.description = null; |
× |
28 |
} |
× |
29 |
|
× |
30 |
static get stringName() {
|
× |
UNCOV
31
|
// name within JSON
|
× |
UNCOV
32
|
return 'description'; |
× |
33 |
} |
× |
34 |
} |
× |
35 |
|
× |
36 |
export default DescriptionCard; |
× |