-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwidget_builder.js
More file actions
47 lines (45 loc) · 1.37 KB
/
widget_builder.js
File metadata and controls
47 lines (45 loc) · 1.37 KB
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
(function () {
let template = document.createElement("template");
template.innerHTML = `
<button id="selModel" type="button">Select Model</button>
<br/>
<label for="selDim0">Select Process</label>
<select id="selDim0"/>
<br/>
<label for="selDim1">Select Relation</label>
<select id="selDim1"/>
<br/>
<label for="selDim2">Select Timestamp</label>
<select id="selDim2"/>
<style>
:host {
display: block;
padding: 1em 1em 1em 1em;
}
</style>
`;
class JointJSBuilderPanel extends HTMLElement {
constructor() {
super();
this._shadowRoot = this.attachShadow({ mode: "open" });
this._shadowRoot.appendChild(template.content.cloneNode(true));
// const db = this.dataBindings.getDataBinding("flowChartData");
this._shadowRoot.getElementById("selModel").onclick = (ev) => {
// db.openSelectModelDialog();
this._submit(ev);
};
}
_submit(e) {
e.preventDefault();
this.dispatchEvent(new CustomEvent("propertiesChanged", {
detail: {
properties: {
openDialog: true
}
}
}));
}
}
customElements.define("com-demo-jointjs-builder",
JointJSBuilderPanel);
})();