Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ContentFlow: avoid image-overlapping

Tags:

javascript

I'm using ContentFlow (http://www.jacksasylum.eu/ContentFlow/index.php) and I would like to avoid image-overlapping adding 20px more on both left and right sides. Could you tell me how to implement it? Many thanks! Corrado.

like image 622
CorPao Avatar asked May 25 '10 12:05

CorPao


1 Answers

So, what you do:

  1. Install the DEFAULT addon
  2. Go to ContentFlowAddOn_DEFAULT.js and search for this:
    alcCoordinates: function (item) {
                var rP = item.relativePosition;
                //var rPN = item.relativePositionNormed;
                var vI = this.conf.visibleItems; 

                var f = 1 - 1/Math.exp( Math.abs(rP)*0.75);
                var x =  item.side * vI/(vI+1)* f; 
                var y = 1;

                return {x: x, y: y};
            },

You are particularly interested in 0.75 number at the end of var f.

  • change it 1.75 and higher depending opn your preferences.
like image 185
Cacofonix Avatar answered Sep 28 '22 05:09

Cacofonix