Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 104: | Rivi 104: | ||
function imagesReady() { | function imagesReady() { | ||
const index = | const index = imageA.findIndex( item => item === current ); | ||
if (index > -1) { | if (index > -1) { | ||
const [currentItem] = | const [currentItem] = imageA.splice( index, 1); | ||
imageA.unshift( currentItem ); | |||
} | } | ||
addImages( images, 0, 4 ); | addImages( images, 0, 4 ); | ||


