Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
6
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
C
corona
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Daniel Kullmann
corona
Commits
147f5818
Commit
147f5818
authored
Jul 24, 2020
by
Daniel Kullmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes code dealing with logarithmic display of plots.
parent
ce141a16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
27 deletions
+4
-27
index.html
index.html
+4
-0
lib/main.js
lib/main.js
+0
-27
No files found.
index.html
View file @
147f5818
...
...
@@ -19,6 +19,10 @@
[
class
*=
"col-"
]
{
padding
:
1rem
;
}
.log-toggle
{
display
:
none
;
}
</style>
<script
src=
"./lib/jquery.min.js"
></script>
...
...
lib/main.js
View file @
147f5818
...
...
@@ -74,22 +74,6 @@ function toggleCountrySelection() {
}
}
function
toggleLogScaleValueOfPlot
(
oElement
)
{
// TODO toggle between linear and log scale
}
function
toggleLogScale
(
oEvent
)
{
var
oParent
=
oEvent
.
target
.
parentElement
;
var
sText
=
oEvent
.
target
.
innerText
;
if
(
sText
.
indexOf
(
"
Linear
"
)
!=
0
)
{
sText
=
"
Linear scale (click to toggle)
"
;
}
else
{
sText
=
"
Logarithmic scale (click to toggle)
"
;
}
oEvent
.
target
.
innerText
=
sText
;
toggleLogScaleValueOfPlot
(
oParent
.
getElementsByTagName
(
"
div
"
)[
0
]);
}
function
addCountry
(
sCountry
)
{
$
(
"
#
"
+
sCountry
).
attr
(
"
checked
"
,
true
);
aCountries
=
[];
...
...
@@ -135,23 +119,12 @@ function createCountryList(mCountries) {
window
.
onload
=
function
()
{
var
mPlotOptions
=
{};
var
aButtons
=
document
.
getElementsByTagName
(
"
button
"
);
for
(
let
oElement
of
aButtons
)
{
if
(
oElement
.
className
===
"
log-toggle
"
)
{
oElement
.
onclick
=
toggleLogScale
;
}
};
// TODO: Decide whether to support log-scale display of plots
Array
.
from
(
document
.
getElementsByClassName
(
"
log-toggle
"
)).
forEach
(
oElement
=>
{
oElement
.
style
.
display
=
"
none
"
;
});
$
.
ajax
({
"
url
"
:
"
./data.json?t=
"
+
new
Date
().
getTime
(),
"
success
"
:
function
(
oResponse
)
{
oData
=
oResponse
;
document
.
getElementById
(
"
now
"
).
innerText
=
oData
.
now
;
createCountryList
(
oData
.
countries
);
// TODO: Set some default countries
if
(
window
.
localStorage
.
corona
)
{
var
mSavedData
=
JSON
.
parse
(
window
.
localStorage
.
corona
);
mSavedData
.
countries
.
forEach
(
sCountry
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment