PageRenderTime 35ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/timeplot.patch

http://showslow.googlecode.com/
Patch | 55 lines | 49 code | 6 blank | 0 comment | 0 complexity | af4e0c4b24a4dd994d171a52fc0129c0 MD5 | raw file
  1. Index: timeplot/timeplot-api.js
  2. ===================================================================
  3. --- timeplot/timeplot-api.js (revision 2024)
  4. +++ timeplot/timeplot-api.js (working copy)
  5. @@ -8,7 +8,8 @@
  6. (function() {
  7. - var local = false;
  8. + var local = true;
  9. + var enableFirebug = false;
  10. // obtain local mode from the document URL
  11. if (document.location.search.length > 0) {
  12. @@ -107,7 +108,7 @@
  13. var timeplotURLPrefix = Timeplot.urlPrefix;
  14. - if (local && !("console" in window)) {
  15. + if (enableFirebug && !("console" in window)) {
  16. var firebug = [ timeplotURLPrefix + "lib/firebug/firebug.js" ];
  17. SimileAjax.includeJavascriptFiles(document, "", firebug);
  18. }
  19. Index: timeplot/scripts/timeplot.js
  20. ===================================================================
  21. --- timeplot/scripts/timeplot.js (revision 2024)
  22. +++ timeplot/scripts/timeplot.js (working copy)
  23. @@ -34,6 +34,7 @@
  24. Timeplot.createPlotInfo = function(params) {
  25. return {
  26. id: ("id" in params) ? params.id : "p" + Math.round(Math.random() * 1000000),
  27. + label: ("label" in params) ? params.label : '',
  28. dataSource: ("dataSource" in params) ? params.dataSource : null,
  29. eventSource: ("eventSource" in params) ? params.eventSource : null,
  30. timeGeometry: ("timeGeometry" in params) ? params.timeGeometry : new Timeplot.DefaultTimeGeometry(),
  31. Index: timeplot/scripts/plot.js
  32. ===================================================================
  33. --- timeplot/scripts/plot.js (revision 2024)
  34. +++ timeplot/scripts/plot.js (working copy)
  35. @@ -81,7 +81,7 @@
  36. x = plot._timeGeometry.toScreen(validTime);
  37. var v = plot._dataSource.getValue(validTime);
  38. if (plot._plotInfo.roundValues) v = Math.round(v);
  39. - plot._valueFlag.innerHTML = new String(v);
  40. + plot._valueFlag.innerHTML = (plot._plotInfo.label ? plot._plotInfo.label + ': ' : '') + new String(v);
  41. var d = new Date(validTime);
  42. var p = plot._timeGeometry.getPeriod();
  43. if (p < day) {
  44. @@ -397,4 +397,4 @@
  45. }
  46. }
  47. -}
  48. \ No newline at end of file
  49. +}