Mercurial > code > home > repos > homeauto
annotate service/arduinoNode/static/output-widgets.html @ 434:2409446ccfa2
switch to uart
Ignore-this: b5285d12100bc182b970ea392f48e259
author | drewp@bigasterisk.com |
---|---|
date | Tue, 09 Apr 2019 09:05:42 -0700 |
parents | 6614416dd2c3 |
children |
rev | line source |
---|---|
193 | 1 <link rel="import" href="/lib/polymer/1.0.9/iron-ajax/iron-ajax.html"> |
2 <link rel="import" href="/lib/polymer/1.0.9/polymer/polymer.html"> | |
3 <link rel="import" href="/lib/polymer/1.0.9/color-picker-element/dist/color-picker.html"> | |
305
6614416dd2c3
influx output for arduino, update web lib path
drewp@bigasterisk.com
parents:
261
diff
changeset
|
4 <link rel="import" href="/rdf/rdf-uri.html"> |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
5 |
193 | 6 <dom-module id="output-sender"> |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
7 <template> |
261
362de08c4c52
route output url through output-sender
drewp@bigasterisk.com
parents:
234
diff
changeset
|
8 <iron-ajax id="output" url="{{output}}" method="PUT"></iron-ajax> |
193 | 9 Set <a href$="{{subj}}">{{compactUri(subj)}}</a>'s |
10 <span>{{compactUri(pred)}}</span> to | |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
11 </template> |
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
12 <script> |
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
13 Polymer({ |
193 | 14 is: 'output-sender', |
15 behaviors: [BigastUri], | |
16 properties: { | |
261
362de08c4c52
route output url through output-sender
drewp@bigasterisk.com
parents:
234
diff
changeset
|
17 output: { type: String, value: "output" }, // url to PUT outputs |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
18 streamedGraph: { notify: true, observer: 'onGraphChange' }, |
193 | 19 subj: { notify: true }, |
20 pred: { notify: true }, | |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
21 value: { notify: true, observer: 'browserChangedValue' } |
218
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
22 }, |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
23 ready: function() { |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
24 this.waitOnChangeMs = 100; |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
25 this.smallestRequestPeriodMs = 100; |
218
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
26 this.synced = false; |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
27 |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
28 this.newRequestNeedsSending = false; |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
29 this.lastSendMs = 0; |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
30 this.$.output.addEventListener('response', this.onResponse.bind(this)); |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
31 |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
32 }, |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
33 onGraphChange: function(streamedGraph) { |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
34 if (!streamedGraph.graph) { |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
35 return; |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
36 } |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
37 var env = streamedGraph.graph.store.rdf; |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
38 streamedGraph.graph.quadStore.quads({ |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
39 subject: env.createNamedNode(this.subj), |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
40 predicate: env.createNamedNode(this.pred) |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
41 }, function(quad) { |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
42 this.serverChangedValue(quad.object.valueOf()); |
218
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
43 }.bind(this)); |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
44 }, |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
45 onResponse: function() { |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
46 if (!this.newRequestNeedsSending) { |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
47 return; |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
48 } |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
49 if (this.$.output.activeRequests.length > 0) { |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
50 return; // 'response' event will call us back |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
51 } |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
52 |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
53 var now = Date.now(), dt = now - this.lastSendMs; |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
54 if (dt < this.smallestRequestPeriodMs) { |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
55 setTimeout(this.onResponse.bind(this), |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
56 this.smallestRequestPeriodMs - dt); |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
57 return; |
234 | 58 } |
218
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
59 this.newRequestNeedsSending = false; |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
60 this.lastSendMs = now; |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
61 this.$.output.generateRequest(); |
193 | 62 }, |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
63 browserChangedValue: function () { |
193 | 64 if (!this.subj || !this.pred) { |
65 return; | |
66 } | |
187
fc5fdcc3ed4a
board control ui: output-rgb, fix ajax protocol, display output uris
drewp@bigasterisk.com
parents:
173
diff
changeset
|
67 //this.$.output.headers = {'content-type': ...} |
193 | 68 this.$.output.params = {s: this.subj, p: this.pred}; |
187
fc5fdcc3ed4a
board control ui: output-rgb, fix ajax protocol, display output uris
drewp@bigasterisk.com
parents:
173
diff
changeset
|
69 this.$.output.body = this.value; |
218
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
70 this.newRequestNeedsSending = true; |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
71 setTimeout(this.onResponse.bind(this), this.waitOnChangeMs); |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
72 }, |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
73 serverChangedValue: function(v) { |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
74 this.value = v; |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
75 this.synced = true; |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
76 } |
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
77 }); |
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
78 </script> |
193 | 79 </dom-module> |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
80 |
193 | 81 <dom-module id="output-rgb"> |
187
fc5fdcc3ed4a
board control ui: output-rgb, fix ajax protocol, display output uris
drewp@bigasterisk.com
parents:
173
diff
changeset
|
82 <template> |
218
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
83 <div style="display: flex"> |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
84 <div> |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
85 <output-sender streamed-graph="{{streamedGraph}}" subj="{{subj}}" pred="{{pred}}" value="{{value}}"></output-sender> |
218
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
86 <div>color pick <span>{{value}}</span> |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
87 <button on-click="black">Black</button> |
193 | 88 <button on-click="white">White</button> |
218
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
89 </div> |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
90 </div> |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
91 <div> |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
92 <color-picker id="pick" width="200" height="100" color="{{value}}"></color-picker> |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
93 </div> |
f8ffb9d8d982
multi-boards on one service, new devices, devices return their current
drewp@bigasterisk.com
parents:
193
diff
changeset
|
94 </div> |
193 | 95 </template> |
96 <script> | |
97 Polymer({ | |
98 is: 'output-rgb', | |
99 properties: { | |
100 value: { notify: true }, | |
101 }, | |
102 ready: function () { | |
103 this.$.pick.addEventListener('colorselected', function (ev) { | |
104 this.value = ev.detail.hex; | |
105 }.bind(this)); | |
106 }, | |
107 black: function() {this.value = "#000000";}, | |
108 white: function() {this.value = "#ffffff";} | |
109 }); | |
110 </script> | |
111 </dom-module> | |
112 | |
113 <dom-module id="output-slider"> | |
114 <template> | |
261
362de08c4c52
route output url through output-sender
drewp@bigasterisk.com
parents:
234
diff
changeset
|
115 <output-sender streamed-graph="{{streamedGraph}}" output="{{output}}" subj="{{subj}}" pred="{{pred}}" value="{{value}}"></output-sender> |
193 | 116 <input type="range" min="{{min}}" max="{{max}}" step="{{step}}" value="{{value::input}}"> <span>{{value}}</span> |
187
fc5fdcc3ed4a
board control ui: output-rgb, fix ajax protocol, display output uris
drewp@bigasterisk.com
parents:
173
diff
changeset
|
117 </template> |
fc5fdcc3ed4a
board control ui: output-rgb, fix ajax protocol, display output uris
drewp@bigasterisk.com
parents:
173
diff
changeset
|
118 <script> |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
119 Polymer({ |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
120 is: 'output-slider', |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
121 properties: { |
261
362de08c4c52
route output url through output-sender
drewp@bigasterisk.com
parents:
234
diff
changeset
|
122 output: { notify: true }, |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
123 streamedGraph: { notify: true }, |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
124 max: { notify: true }, |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
125 min: { notify: true }, |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
126 step: { notify: true } |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
127 }, |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
128 }); |
187
fc5fdcc3ed4a
board control ui: output-rgb, fix ajax protocol, display output uris
drewp@bigasterisk.com
parents:
173
diff
changeset
|
129 </script> |
193 | 130 </dom-module> |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
131 |
193 | 132 <!-- |
133 TODO(polyup): Inheriting from other custom elements is not yet supported. | |
134 See: https://www.polymer-project.org/1.0/docs/migration.html#inheritance | |
135 --> | |
136 <dom-module id="output-fixed-text"> | |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
137 <template> |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
138 <output-sender streamed-graph="{{streamedGraph}}" subj="{{subj}}" pred="{{pred}}" value="{{value}}"></output-sender> |
193 | 139 <textarea rows="{{rows}}" cols="{{cols}}" value="{{value::input}}"></textarea> |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
140 </template> |
193 | 141 <script> |
142 Polymer({ | |
143 is: 'output-fixed-text', | |
144 properties: { | |
145 cols: { notify: true }, | |
146 rows: { notify: true } | |
147 }, | |
148 }); | |
149 </script> | |
150 </dom-module> | |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
151 |
193 | 152 <dom-module id="output-switch"> |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
153 <template> |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
154 <output-sender streamed-graph="{{streamedGraph}}" subj="{{subj}}" pred="{{pred}}" value="{{value}}"></output-sender> |
193 | 155 <input type="checkbox" checked="{{check::change}}"> <span>{{value}}</span> |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
156 </template> |
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
157 <script> |
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
158 Polymer({ |
193 | 159 is: 'output-switch', |
160 properties: { | |
161 check: { | |
162 type: Boolean, | |
163 value: false, | |
164 observer: 'checkChanged' | |
165 }, | |
166 value: { notify: true } | |
167 }, | |
168 checkChanged: function () { | |
169 this.value = this.check ? 'high' : 'low'; | |
170 }, | |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
171 }); |
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
172 </script> |
193 | 173 </dom-module> |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
174 |
193 | 175 <dom-module id="output-widget-any"> |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
176 <template></template> |
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
177 <script> |
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
178 Polymer({ |
193 | 179 is: 'output-widget-any', |
180 properties: { | |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
181 desc: { type: Object, notify: true }, |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
182 streamedGraph: { type: Object, notify: true, observer: 'onGraph' }, |
193 | 183 }, |
184 ready: function () { | |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
185 this.elem = document.createElement(this.desc.element); |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
186 this.appendChild(this.elem); |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
187 for (var k of Object.keys(this.desc)) { |
233
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
188 this.elem.setAttribute(k, this.desc[k]); |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
189 } |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
190 this.elem.streamedGraph = this.streamedGraph; |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
191 }, |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
192 onGraph: function(g) { |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
193 if (this.elem) { |
4ebb5cc30002
server/browser graph sync. cut dependency on the WS version. merge some changes between arduino/pi code.
drewp@bigasterisk.com
parents:
218
diff
changeset
|
194 this.elem.streamedGraph = g; |
170
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
195 } |
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
196 } |
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
197 }); |
376599552a4c
polymer board debug page with working output widgets
drewp@bigasterisk.com
parents:
diff
changeset
|
198 </script> |
193 | 199 </dom-module> |