-
Notifications
You must be signed in to change notification settings - Fork 60
/
timeplot.patch
55 lines (49 loc) · 2.24 KB
/
timeplot.patch
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
Index: timeplot/timeplot-api.js
===================================================================
--- timeplot/timeplot-api.js (revision 2024)
+++ timeplot/timeplot-api.js (working copy)
@@ -8,7 +8,8 @@
(function() {
- var local = false;
+ var local = true;
+ var enableFirebug = false;
// obtain local mode from the document URL
if (document.location.search.length > 0) {
@@ -107,7 +108,7 @@
var timeplotURLPrefix = Timeplot.urlPrefix;
- if (local && !("console" in window)) {
+ if (enableFirebug && !("console" in window)) {
var firebug = [ timeplotURLPrefix + "lib/firebug/firebug.js" ];
SimileAjax.includeJavascriptFiles(document, "", firebug);
}
Index: timeplot/scripts/timeplot.js
===================================================================
--- timeplot/scripts/timeplot.js (revision 2024)
+++ timeplot/scripts/timeplot.js (working copy)
@@ -34,6 +34,7 @@
Timeplot.createPlotInfo = function(params) {
return {
id: ("id" in params) ? params.id : "p" + Math.round(Math.random() * 1000000),
+ label: ("label" in params) ? params.label : '',
dataSource: ("dataSource" in params) ? params.dataSource : null,
eventSource: ("eventSource" in params) ? params.eventSource : null,
timeGeometry: ("timeGeometry" in params) ? params.timeGeometry : new Timeplot.DefaultTimeGeometry(),
Index: timeplot/scripts/plot.js
===================================================================
--- timeplot/scripts/plot.js (revision 2024)
+++ timeplot/scripts/plot.js (working copy)
@@ -81,7 +81,7 @@
x = plot._timeGeometry.toScreen(validTime);
var v = plot._dataSource.getValue(validTime);
if (plot._plotInfo.roundValues) v = Math.round(v);
- plot._valueFlag.innerHTML = new String(v);
+ plot._valueFlag.innerHTML = (plot._plotInfo.label ? plot._plotInfo.label + ': ' : '') + new String(v);
var d = new Date(validTime);
var p = plot._timeGeometry.getPeriod();
if (p < day) {
@@ -397,4 +397,4 @@
}
}
-}
\ No newline at end of file
+}