What angles you have from every people? Do you have only north, south, east and west or also northeast, southeast, southwest and northwest?
I can do this code for you. Maybe also provide example images of every angle?
Hi, I'm afraid I haven't got the full set of images yet..
Can we use placeholders? I'm imagine that if you can create me an example or two, that I can take it from there.
Thanks for coming back so quickly,
I just created a demo for this (using placeholders that show which direction each image must look)
It assumes that we know how many items fit in a row.. (i set a variable at the beginning)
The idea, is to bind a custom event handler on all the
.mug_shot items which decides which image to show, and then trigger that event on all mug-shots whenever you hover over one of the images.
It is at the line
src: placeholder + direction
at that point you have access to the variable
pos.image which holds the original image at that point. You also have
direction which holds one of
"leftup"(to the left and up)
"leftdown"(to the left and down)
"rightup"(to the right and up)
"rightdown"(to the right and down)
This way you can combine them to create the target image you want to show.
For example (assuming all images are
src: pos.image.replace('.png','-' + direction + '.png')
will show images with format
If you post the naming convention you use i could post the exact way to do it.