Removed useless controls + changed controls style
This commit is contained in:
@ -1,14 +1,13 @@
|
|||||||
.control-global{
|
.control-global{
|
||||||
width: 28px;
|
width: 27px;
|
||||||
height: 28px;
|
height: 27px;
|
||||||
border: 1px solid dimgray;
|
border: 1px solid #303030;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
transition: border 0.25s;
|
transition: border 0.25s;
|
||||||
background-color: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.animated:hover{
|
.animated:hover{
|
||||||
border: 3px solid dimgray;
|
border: 3px solid #303030;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,10 +39,9 @@
|
|||||||
padding: 2px 0;
|
padding: 2px 0;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
|
||||||
/* Position the tooltip text - see examples below! */
|
|
||||||
width: 130px;
|
width: 130px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
left: 100%;
|
right: 100%;
|
||||||
top:3px;
|
top:3px;
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#control_bar{
|
#control_bar{
|
||||||
height: 28px;
|
height: 28px;
|
||||||
background-color: dimgray;
|
|
||||||
border-top-left-radius: 12px;
|
border-top-left-radius: 12px;
|
||||||
border-top-right-radius: 12px;
|
border-top-right-radius: 12px;
|
||||||
padding-left: 12px;
|
padding-left: 12px;
|
||||||
@ -26,6 +25,10 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
column-gap: 5px;
|
column-gap: 5px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
|
border-left : 1px solid white;
|
||||||
|
border-right : 1px solid white;
|
||||||
|
border-top : 1px solid white;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************/
|
/*********************/
|
||||||
|
@ -199,18 +199,9 @@ let dummyCallback = function(){
|
|||||||
|
|
||||||
// Defining keys for global controls
|
// Defining keys for global controls
|
||||||
|
|
||||||
let jumpKey = "jump-control";
|
|
||||||
let goToNowKey = "go-to-now-control";
|
let goToNowKey = "go-to-now-control";
|
||||||
|
|
||||||
let zoomInKey = "zoom-in-control";
|
|
||||||
let zoomOutKey = "zoom-out-control";
|
|
||||||
let shiftOlderKey = "shift-older-control";
|
|
||||||
let shiftNewerKey = "shift-newer-control";
|
|
||||||
|
|
||||||
|
|
||||||
let xyKey = "xy-control";
|
let xyKey = "xy-control";
|
||||||
let cursorKey = "cursor-control";
|
|
||||||
let legendsKey = "legends-control";
|
|
||||||
|
|
||||||
let globalControls = (function (){
|
let globalControls = (function (){
|
||||||
let controlsMap = {};
|
let controlsMap = {};
|
||||||
@ -220,43 +211,17 @@ let globalControls = (function (){
|
|||||||
controlBar.id = "control_bar";
|
controlBar.id = "control_bar";
|
||||||
panel.appendChild(controlBar);
|
panel.appendChild(controlBar);
|
||||||
|
|
||||||
let jumpControl = new Control("res/jump.png", "res/jump_blocked.png", "Jump", dummyCallback);
|
let goToNowControl = new Control("res/go_to_now_white.png", "res/go_to_now_blocked.png", "Go to now", graphs.gotoNow);
|
||||||
let goToNowControl = new Control("res/go_to_now.png", "res/go_to_now_blocked.png", "Go to now", graphs.gotoNow);
|
|
||||||
|
|
||||||
let zoomInControl = new Control("res/zoom_in.png", "res/zoom_in_blocked.png", "Zoom in (time)", graphs.zoomIn);
|
let xyControl = new Control("res/x_zoom_white.png", "res/y_zoom_white.png", "Time<->Y zoom (one graph)", graphs.toggleZoomMode, graphs.toggleZoomMode);
|
||||||
let zoomOutControl = new Control("res/zoom_out.png", "res/zoom_out_blocked.png", "Zoon out (time)", graphs.zoomOut);
|
|
||||||
let shiftOlderControl = new Control("res/shift_older.png", "res/shift_older_blocked.png", "Shift to older", graphs.shiftOlder);
|
|
||||||
let shiftNewerControl = new Control("res/shift_newer.png", "res/shift_newer_blocked.png", "Shift to newer", graphs.shiftNewer);
|
|
||||||
|
|
||||||
|
|
||||||
let xyControl = new Control("res/y_direction.png", "res/x_direction.png", "Time<->Y zoom (one graph)", graphs.toggleZoomMode, graphs.toggleZoomMode);
|
|
||||||
let cursorControl = new Control("res/remove_cursor.png", "res/remove_cursor_blocked.png", "Remove cursor", graphs.removeCursor);
|
|
||||||
let legendsControl = new Control("res/display_legends.png", "res/remove_legends.png", "Legends", graphs.displayAllLegends, graphs.hideAllLegends);
|
|
||||||
|
|
||||||
controlBar.appendChild(jumpControl)
|
|
||||||
controlBar.appendChild(goToNowControl)
|
controlBar.appendChild(goToNowControl)
|
||||||
goToNowControl.changeToAlt();
|
goToNowControl.changeToAlt();
|
||||||
controlBar.appendChild(new VerticalDivider());
|
controlBar.appendChild(new VerticalDivider());
|
||||||
controlBar.appendChild(zoomInControl);
|
|
||||||
controlBar.appendChild(zoomOutControl);
|
|
||||||
controlBar.appendChild(shiftOlderControl);
|
|
||||||
controlBar.appendChild(shiftNewerControl);
|
|
||||||
controlBar.appendChild(new VerticalDivider());
|
|
||||||
controlBar.appendChild(xyControl);
|
controlBar.appendChild(xyControl);
|
||||||
controlBar.appendChild(cursorControl);
|
|
||||||
cursorControl.changeToAlt();
|
|
||||||
controlBar.appendChild(legendsControl);
|
|
||||||
legendsControl.changeToAlt();
|
|
||||||
|
|
||||||
controlsMap[jumpKey] = jumpControl;
|
|
||||||
controlsMap[goToNowKey] = goToNowControl;
|
controlsMap[goToNowKey] = goToNowControl;
|
||||||
controlsMap[zoomInKey] = zoomInControl;
|
|
||||||
controlsMap[zoomOutKey] = zoomOutControl;
|
|
||||||
controlsMap[shiftOlderKey] = shiftOlderControl;
|
|
||||||
controlsMap[shiftNewerKey] = shiftNewerControl;
|
|
||||||
controlsMap[xyKey] = xyControl;
|
controlsMap[xyKey] = xyControl;
|
||||||
controlsMap[cursorKey] = cursorControl;
|
|
||||||
controlsMap[legendsKey] = legendsControl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getControlsMap(){
|
function getControlsMap(){
|
||||||
@ -907,7 +872,6 @@ let graphs = (function (){
|
|||||||
*/
|
*/
|
||||||
function gotoNow() {
|
function gotoNow() {
|
||||||
cursorLine(null);
|
cursorLine(null);
|
||||||
globalControls.getControlsMap()[cursorKey].changeToAlt();
|
|
||||||
if (!liveMode) {
|
if (!liveMode) {
|
||||||
setMinMax(graphs.now() - (currentMaxTime - currentMinTime), graphs.now());
|
setMinMax(graphs.now() - (currentMaxTime - currentMinTime), graphs.now());
|
||||||
}
|
}
|
||||||
@ -1065,7 +1029,6 @@ let graphs = (function (){
|
|||||||
|
|
||||||
function removeCursor(evt=null) {
|
function removeCursor(evt=null) {
|
||||||
graphs.cursorLine(null);
|
graphs.cursorLine(null);
|
||||||
globalControls.getControlsMap()[cursorKey].changeToAlt();
|
|
||||||
graphs.update();
|
graphs.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1106,12 +1069,10 @@ let graphs = (function (){
|
|||||||
|
|
||||||
function displayAllLegends(){
|
function displayAllLegends(){
|
||||||
showLegends(true, false);
|
showLegends(true, false);
|
||||||
globalControls.getControlsMap()[legendsKey].changeToAlt();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideAllLegends(){
|
function hideAllLegends(){
|
||||||
showLegends(false, false);
|
showLegends(false, false);
|
||||||
globalControls.getControlsMap()[legendsKey].changeToMain();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1213,7 +1174,6 @@ let graphs = (function (){
|
|||||||
cursorElement.style.display = 'block';
|
cursorElement.style.display = 'block';
|
||||||
cursorElement.style.left = (cursorLinePos - 1) + 'px';
|
cursorElement.style.left = (cursorLinePos - 1) + 'px';
|
||||||
cursorElement.style.height = window.innerHeight + 'px';
|
cursorElement.style.height = window.innerHeight + 'px';
|
||||||
globalControls.getControlsMap()[cursorKey].changeToMain();
|
|
||||||
}
|
}
|
||||||
return cursorLinePos;
|
return cursorLinePos;
|
||||||
}
|
}
|
||||||
@ -1628,7 +1588,6 @@ function Graph(gindex, container, x_label, y_label, tag, scaleType = "linear"){
|
|||||||
} else {
|
} else {
|
||||||
graphs.cursorLine(null);
|
graphs.cursorLine(null);
|
||||||
legend.style.display = 'none';
|
legend.style.display = 'none';
|
||||||
globalControls.getControlsMap()[legendsKey].changeToMain();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
client/res/go_to_now_white.png
Normal file
BIN
client/res/go_to_now_white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
BIN
client/res/x_zoom_white.png
Normal file
BIN
client/res/x_zoom_white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
client/res/y_zoom_white.png
Normal file
BIN
client/res/y_zoom_white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
Reference in New Issue
Block a user