-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added guided tour #164
base: master
Are you sure you want to change the base?
added guided tour #164
Conversation
Closes #150 TDH: this comment does not work because the "Closes" comments must be in the first comment of the PR |
inst/htmljs/animint.js
Outdated
element: "#" + id, | ||
popover: { | ||
title: geom.charAt(0).toUpperCase() + geom.slice(1), | ||
description: `${helpText} Data are shown for the current selection of: ${showSelected}. Click to change selection of: ${clickSelects}.` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like a good first step thanks!
when showSelected is an array ['var1','var2']
, does this work?
also it could be missing or empty array []
(same for clickSelects, and help)
so in that case we would want to omit each missing part altogether.
inst/htmljs/animint.js
Outdated
@@ -185,6 +185,24 @@ var animint = function (to_select, json_file) { | |||
|
|||
var add_geom = function (g_name, g_info) { | |||
// Determine if data will be an object or an array. | |||
// added geom properties in steps array | |||
var geom = g_info.geom; | |||
var id = "plot_" + geom + "Plot"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is good! what is unexpected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Geom2_vline_vlinePlot please
- please change "Geom2_vline_vlinePlot" to the value of
g_info.classed
- remove "Data are shown for the current selection of ." no text like this should be shown if there are no showSelected variables.
- remove "Click to change selection of: ." no text like this should be shown if there is no clickSelects variable.
inst/htmljs/index.html
Outdated
@@ -12,6 +12,8 @@ | |||
<script type="text/javascript" src="vendor/jquery-1.11.3.min.js"></script> | |||
<script type="text/javascript" src="vendor/selectize.min.js"></script> | |||
<link rel="stylesheet" type="text/css" href="vendor/selectize.css" /> | |||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/driver.js.iife.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please copy these to inst/htmljs/vendor? and then use relative links here? (as with jquery etc above)
this approach is more stable (all files hosted on same server, don't need to rely on external cdn)
inst/htmljs/animint.js
Outdated
|
||
element.append("button") | ||
.text("Start Tour") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please undo addition of empty line in the middle of statements like this
inst/htmljs/animint.js
Outdated
.text("Start Tour") | ||
|
||
.on("click", function() { | ||
startTour(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is the only place that startTour is called, I think it not worth adding the startTour function. can you please move the contents of startTour inside this anonymous function?
looks like a good start, thanks very much! |
updated html to use relative paths
added guided tour feature
Closes #150