mirror of
https://github.com/jcreek/SelectionWheel.git
synced 2026-07-14 03:33:43 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ff58967c8c | |||
| d15f55b94b | |||
| d411a76c49 | |||
| 546c647234 | |||
| e7f80e1885 | |||
| 5dc201eac7 |
@@ -180,6 +180,7 @@ function drawWheel() {
|
|||||||
.on('end', () => {
|
.on('end', () => {
|
||||||
// mark question as seen
|
// mark question as seen
|
||||||
d3.select(`.slice:nth-child(${picked + 1}) path`).attr('fill', '#111');
|
d3.select(`.slice:nth-child(${picked + 1}) path`).attr('fill', '#111');
|
||||||
|
d3.select(`.slice:nth-child(${picked + 1}) text`).attr('fill', '#ffffff');
|
||||||
// populate question
|
// populate question
|
||||||
d3.select('#question h1').text(data[picked].label.trim());
|
d3.select('#question h1').text(data[picked].label.trim());
|
||||||
oldrotation = rotation;
|
oldrotation = rotation;
|
||||||
|
|||||||
@@ -7,9 +7,6 @@ import { registerRoute, NavigationRoute, Route } from 'workbox-routing';
|
|||||||
// eslint-disable-next-line no-underscore-dangle, no-restricted-globals
|
// eslint-disable-next-line no-underscore-dangle, no-restricted-globals
|
||||||
precacheAndRoute(self.__WB_MANIFEST);
|
precacheAndRoute(self.__WB_MANIFEST);
|
||||||
|
|
||||||
// Enable navigation preload - this should reduce navigation latency
|
|
||||||
navigationPreload.enable();
|
|
||||||
|
|
||||||
const navigationRoute = new NavigationRoute(new NetworkFirst({
|
const navigationRoute = new NavigationRoute(new NetworkFirst({
|
||||||
cacheName: 'navigations',
|
cacheName: 'navigations',
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -42,6 +42,8 @@
|
|||||||
<textarea id="input-lines" class="input-items" rows="15" cols="60" name="text"
|
<textarea id="input-lines" class="input-items" rows="15" cols="60" name="text"
|
||||||
placeholder="Enter names to be shuffled, one per line. Leave this area empty in order to use a default set of generated names.
|
placeholder="Enter names to be shuffled, one per line. Leave this area empty in order to use a default set of generated names.
|
||||||
|
|
||||||
|
Click or tap on the wheel to spin it.
|
||||||
|
|
||||||
You can also customise the centre of the spinner with an image. Just put ?imgUrl= at the end of the web address and the URL of the image you want to use.
|
You can also customise the centre of the spinner with an image. Just put ?imgUrl= at the end of the web address and the URL of the image you want to use.
|
||||||
|
|
||||||
For example, https://wheel.jcreek.co.uk/?imgUrl=https://www.mammal.org.uk/wp-content/uploads/2021/09/red-fox-300x300.jpg"></textarea>
|
For example, https://wheel.jcreek.co.uk/?imgUrl=https://www.mammal.org.uk/wp-content/uploads/2021/09/red-fox-300x300.jpg"></textarea>
|
||||||
|
|||||||
Reference in New Issue
Block a user