Edit slider custom cursor

This commit is contained in:
Paul Nicoué 2022-12-19 14:24:51 +01:00
parent 20cc18d234
commit ccce322045
6 changed files with 25 additions and 13 deletions

View file

@ -124,7 +124,11 @@ function editColorTheme(slide) {
cursorColor = 'dark';
}
if (body && cursorOrientation && cursorColor) {
body.style.cursor = `url('/images/cursor-${cursorOrientation}-${cursorColor}.svg') 0 16, auto`;
if (cursorOrientation === 'previous') {
body.style.cursor = `url('/images/cursor-${cursorOrientation}-${cursorColor}.svg') 0 12, auto`;
} else if (cursorOrientation === 'next') {
body.style.cursor = `url('/images/cursor-${cursorOrientation}-${cursorColor}.svg') 24 12, auto`;
}
}
}
}
@ -154,7 +158,11 @@ function setCursorOnMove() {
cursorOrientation = 'previous';
}
if (cursorOrientation && cursorColor) {
body.style.cursor = `url('/images/cursor-${cursorOrientation}-${cursorColor}.svg') 0 16, auto`;
if (cursorOrientation === 'previous') {
body.style.cursor = `url('/images/cursor-${cursorOrientation}-${cursorColor}.svg') 0 12, auto`;
} else if (cursorOrientation === 'next') {
body.style.cursor = `url('/images/cursor-${cursorOrientation}-${cursorColor}.svg') 24 12, auto`;
}
}
});
}