2 This file is part of JonDesign's SmoothGallery v2.1beta1.
4 JonDesign's SmoothGallery is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
9 JonDesign's SmoothGallery is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with JonDesign's SmoothGallery; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 Main Developer: Jonathan Schemoul (JonDesign: http://www.jondesign.net/)
21 gallery.Transitions.extend({
22 fadeslideleft: function(oldFx, newFx, oldPos, newPos){
23 oldFx.options.transition = newFx.options.transition = Fx.Transitions.Cubic.easeOut;
24 oldFx.options.duration = newFx.options.duration = 1500;
28 left: [this.galleryElement.offsetWidth, 0],
31 oldFx.start({opacity: [1,0]});
33 newFx.start({opacity: [0,1]});
35 left: [0, this.galleryElement.offsetWidth],
37 }).chain(function(fx){fx.set({left: 0});}.pass(oldFx));
40 continuoushorizontal: function(oldFx, newFx, oldPos, newPos){
41 oldFx.options.transition = newFx.options.transition = Fx.Transitions.linear;
43 ((newPos > oldPos) || ((newPos==0) && (oldPos == (this.maxIter-1) ))) &&
44 (!((newPos == (this.maxIter-1 )) && (oldPos == 0)))
46 oldFx.set({opacity: 1});
48 left: [0, this.galleryElement.offsetWidth * -1]
50 newFx.set({opacity: 1, left: this.galleryElement.offsetWidth});
52 left: [this.galleryElement.offsetWidth, 0]
55 oldFx.set({opacity: 1});
57 left: [0, this.galleryElement.offsetWidth]
59 newFx.set({opacity: 1, left: this.galleryElement.offsetWidth * -1});
61 left: [this.galleryElement.offsetWidth * -1, 0]
65 continuousvertical: function(oldFx, newFx, oldPos, newPos){
66 oldFx.options.transition = newFx.options.transition = Fx.Transitions.linear;
68 ((newPos > oldPos) || ((newPos==0) && (oldPos == (this.maxIter-1) ))) &&
69 (!((newPos == (this.maxIter-1 )) && (oldPos == 0)))
71 oldFx.set({opacity: 1});
73 top: [0, this.galleryElement.offsetHeight * -1]
75 newFx.set({opacity: 1, top: this.galleryElement.offsetHeight});
77 top: [this.galleryElement.offsetHeight, 0]
80 oldFx.set({opacity: 1});
82 top: [0, this.galleryElement.offsetHeight]
84 newFx.set({opacity: 1, top: this.galleryElement.offsetHeight * -1});
86 top: [this.galleryElement.offsetHeight * -1, 0]