bug fix white img from right on cards on ff
This commit is contained in:
parent
34b3823649
commit
ee60bb2255
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -29,16 +29,16 @@ export default {
|
|||
// switch images on mousemove
|
||||
el.addEventListener('mousemove', function (event) {
|
||||
const figs = this.querySelectorAll('figure.loaded')
|
||||
// console.log('mousemove', this, event, figs.length)
|
||||
console.log('mousemove', this, event, figs.length)
|
||||
// let len = figs.length
|
||||
// let w = this.clientWidth;
|
||||
// let g = w / len;
|
||||
// let delta = Math.floor(event.layerX / g)
|
||||
let delta = Math.floor(event.layerX / (this.clientWidth / figs.length))
|
||||
delta = delta < 0 ? 0 : delta
|
||||
// console.log('delta', delta)
|
||||
delta = delta < 0 ? 0 : delta >= figs.length ? figs.length - 1 : delta
|
||||
console.log('delta', delta)
|
||||
figs.forEach((fig, index) => {
|
||||
// console.log(index)
|
||||
console.log(index)
|
||||
if (index === delta) {
|
||||
// fig.style.display = "block"
|
||||
fig.classList.remove('hide')
|
||||
|
|
Loading…
Reference in New Issue