-
Notifications
You must be signed in to change notification settings - Fork 2
/
chart-add-behavior.html
57 lines (48 loc) · 1.73 KB
/
chart-add-behavior.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!-- External Polymer Styles/elements dependency -->
<!--<link rel="import" href="bower_components/iron-icons/iron-icons.html">-->
<link rel="import" href="bower_components/paper-icon-button/paper-icon-button.html">
<!-- Epiviz element dependency -->
<link rel="import" href="epiviz-add-chart.html">
<script>
/**
* `ChartAddBehavior` object manages the `<epiviz-add-chart>` element.
* Environment and Navigation elements inherit this behavior to add a new chart.
*
* @polymerBehavior
**/
EpivizChartAddBehavior = function (superClass) {
return class extends superClass {
constructor() {
super();
}
static get properties() {
return {};
}
/**
* Shows the `<epiviz-add-chart>` element
*/
_showAddDialog() { }
/**
* Initializes the `<epiviz-add-chart>` element
*/
_initializeAddDialog() {
var chartContainer = this.$.header;
var currAddElem = this.shadowRoot.querySelector('epiviz-add-chart');
if (currAddElem) {
var dataManagerElem = document.querySelector('epiviz-data-source');
if (dataManagerElem) {
Polymer.dom(currAddElem).measurements = dataManagerElem.measurementSet;
}
}
}
/**
* Intializes chart container DOM element for settings and colors elements.
*/
_initializeDialogContainer() { }
ready() {
super.ready();
this._initializeDialogContainer();
}
}
}
</script>