Mercurial > code > home > repos > homeauto
comparison service/wifi/src/index.ts @ 674:2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
Ignore-this: afcf4436ac3d7b88c0d7fc88de81d8e4
author | drewp@bigasterisk.com |
---|---|
date | Thu, 02 Jan 2020 00:23:36 -0800 |
parents | f2215949c0c9 |
children | 9ae34280218b |
comparison
equal
deleted
inserted
replaced
673:f2215949c0c9 | 674:2b9865bf1737 |
---|---|
1 console.log('p-1'); | 1 import { PolymerElement, html } from "@polymer/polymer"; |
2 import { PolymerElement, html } from '@polymer/polymer'; | 2 import { |
3 import { customElement, property, computed } from '@polymer/decorators'; | 3 customElement, |
4 import { N3Store } from "n3" | 4 property, |
5 computed, | |
6 observe, | |
7 } from "@polymer/decorators"; | |
8 import { N3Store } from "n3"; | |
5 //import {* as wt} from './wifi-table'; | 9 //import {* as wt} from './wifi-table'; |
6 import { VersionedGraph, StreamedGraph } from "streamed-graph"; | 10 import { VersionedGraph, StreamedGraph } from "streamed-graph"; |
7 export {DomBind} from '@polymer/polymer/lib/elements/dom-bind.js'; | 11 export { DomBind } from "@polymer/polymer/lib/elements/dom-bind.js"; |
8 console.log('p0'); | 12 |
9 console.log('p1', StreamedGraph.name); | 13 console.log("here is a real dependency on ", StreamedGraph.name); |
10 @customElement('wifi-display') | 14 |
15 @customElement("wifi-display") | |
11 class WifiDisplay extends PolymerElement { | 16 class WifiDisplay extends PolymerElement { |
17 @property({ type: Object, observer: WifiDisplay.prototype.onGraphChanged}) | |
18 graph!: VersionedGraph; | |
12 | 19 |
13 @property({ type: Object }) | |
14 graph!: StreamedGraph; | |
15 | 20 |
16 ready() { | 21 onGraphChanged() { |
17 super.ready(); | 22 console.log("new graph", this.graph); |
18 console.log('p2'); | 23 } |
19 // this.graph.addEventListener('change', this.redraw.bind(this)); | 24 |
20 } | 25 ready() { |
21 // redraw() { | 26 super.ready(); |
22 // wt.render(this.graph.graph); | 27 } |
23 // } | 28 |
24 static get template() { | 29 // redraw() { |
25 return html`here`; | 30 // wt.render(this.graph.graph); |
26 } | 31 // } |
32 static get template() { | |
33 return html` | |
34 here | |
35 `; | |
36 } | |
27 } | 37 } |
28 console.log('p3'); |