diff --git a/client/SEAWebClient.html b/client/SEAWebClient.html
index a893a81..ffe0fee 100644
--- a/client/SEAWebClient.html
+++ b/client/SEAWebClient.html
@@ -12,6 +12,7 @@
+
${this.formattedDate}
- `
+ `
+ this.appendChild(this.datePopup);
}
}
-customElements.define("sea-dates-indicator", DatesIndicator)
\ No newline at end of file
+customElements.define("sea-date-indicator", DateIndicator)
\ No newline at end of file
diff --git a/client/jsFiles/SEAWebClientGraphics.js b/client/jsFiles/SEAWebClientGraphics.js
index 8a245e6..a92b90d 100644
--- a/client/jsFiles/SEAWebClientGraphics.js
+++ b/client/jsFiles/SEAWebClientGraphics.js
@@ -197,9 +197,16 @@ let dummyCallback = function(){
console.log("Dummy callback called");
}
-// Defining keys for global controls
+function dummyJumpCallback(dateTimestampMs, timeValueMs, mode){
+ console.log("Date is : ");
+ console.log(dateTimestampMs);
+ console.log("Time is : ");
+ console.log(timeValueMs);
+ console.log("Mode is :");
+ console.log(mode);
+}
-let goToNowKey = "go-to-now-control";
+// Defining keys for global controls
let xyKey = "xy-control";
@@ -211,16 +218,10 @@ let globalControls = (function (){
controlBar.id = "control_bar";
panel.appendChild(controlBar);
- let goToNowControl = new Control("res/go_to_now_white.png", "res/go_to_now_blocked.png", "Go to now", graphs.gotoNow);
-
let xyControl = new Control("res/x_zoom_white.png", "res/y_zoom_white.png", "Time<->Y zoom (one graph)", graphs.toggleZoomMode, graphs.toggleZoomMode);
- controlBar.appendChild(goToNowControl)
- goToNowControl.changeToAlt();
- controlBar.appendChild(new VerticalDivider());
controlBar.appendChild(xyControl);
- controlsMap[goToNowKey] = goToNowControl;
controlsMap[xyKey] = xyControl;
}
@@ -242,7 +243,7 @@ let globalIndicators = (function (){
function loadIndicators(panel){
let leftDate = Date.now() - 30*60*1000;
- let datesIndicator = new DatesIndicator(leftDate);
+ let datesIndicator = new DateIndicator(leftDate, () => {graphs.gotoNow();}, dummyJumpCallback);
panel.appendChild(datesIndicator);
datesIndicator.style.marginLeft = "auto";
@@ -265,7 +266,7 @@ let globalIndicators = (function (){
function loadGraphicsMenu(panel){
let menuGraphicsPopup = new MenuPopup();
- let removeCursorHelpEntry = new HelpEntry("How to remove the cursor", "You cam double click/tap on any graph.");
+ let removeCursorHelpEntry = new HelpEntry("How to remove the cursor", "You can double click/tap on any graph.");
menuGraphicsPopup.addEntry(removeCursorHelpEntry);
let graphicsMenuControl = new Control("res/menu_white.png", "res/menu_white.png", "Menu", () => {menuGraphicsPopup.show()});
@@ -402,10 +403,12 @@ let graphs = (function (){
}
if (liveMode && cursorLinePos === null)
// gotoNowElm.innerHTML = '';
- globalControls.getControlsMap()[goToNowKey].changeToAlt();
+ // globalControls.getControlsMap()[goToNowKey].changeToAlt();
+ console.log("Need to change to nothing");
else
// gotoNowElm.innerHTML = 'go to now';
- globalControls.getControlsMap()[goToNowKey].changeToMain();
+ // globalControls.getControlsMap()[goToNowKey].changeToMain();
+ console.log("Need to change to seen");
}
/**
diff --git a/seaweb.py b/seaweb.py
index 42d7b21..ce40f82 100755
--- a/seaweb.py
+++ b/seaweb.py
@@ -149,6 +149,7 @@ def subdir_test_file(file):
resp = flask.send_file("client/test/"+file, mimetype=guess_mimetype(file))
return resp
+@app.route('/components/dates_popup/
')
@app.route('/components/menu_popup/')
@app.route('/components/help_popup/')
@app.route('/components/help_entry/')