PageSourceSearch

https://heritagecenter.org/components/com_roksprocket/layouts/features/themes/showcase/showcase.js

js heritagecenter.org collected 2026-10-02 18:23:56 UTC 2,746 bytes, 93 lines download raw bytes

1
2((function(){
3	if (typeof this.RokSprocket == 'undefined') this.RokSprocket = {};
4	else Object.merge(this.RokSprocket, {Showcase: null});
5
6	var Showcase = new Class({
7
8		Extends: this.RokSprocket.Features,
9
10		options: {
11			curve: 'cubic-bezier(0.37,0.61,0.59,0.87)',
12			duration: '400ms',
13			data: 'showcase',
14			settings: {
15				animation: 'crossfade',
16				autoplay: false,
17				delay: 5
18			}
19		},
20
21		initialize: function(options){
22			this.parent(options);
23
24			Object.merge(this.animations.crossfade, {top: 0, left: 0});
25		},
26
27		animate: function(container, from, to){
28			var panes = container.getElements('[data-' + this.data + '-pane]'),
29				settings = this.getSettings(container),
30				animation = this.animations[settings.animation] || this.animations.crossfade,
31				current = panes[from],
32				next = panes[to];
33
34			if (Browser.ie && Browser.version < 8){
35				contents.setStyle('zoom', 1);
36				images.setStyle('zoom', 1);
37			}
38
39			var transition = settings.animation == 'random' ? this.getRandom() : animation,
40				initialStyles = {display: 'block', 'z-index': 2, 'position': 'absolute', 'opacity': 0};
41
42			['top', 'right', 'bottom', 'left'].each(function(dir){
43				next.style[dir] = '';
44			}, this);
45
46			panes.styles(Object.merge({}, transition.from, {position: 'absolute'}));
47			current.styles(Object.merge({}, transition.to, {'z-index': 1, position: 'relative'}));
48			next.styles(Object.merge({}, transition.from, initialStyles));
49
50			if (Browser.ie && Browser.version < 9){
51				next.set('morph', {
52					link: 'cancel',
53					duration: this.options.duration.toInt(),
54					transition: 'quad:in:out',
55					onComplete: function(){
56						next.styles(Object.merge({}, transition.to, {position: 'relative'}));
57						current.styles(Object.merge({}, transition.from, {position: 'absolute', display: 'none'}));
58						next.get('morph').removeEvents('onComplete');
59
60						if (settings.autoplay && settings.autoplay.toInt()) this.startTimer(container);
61					}.bind(this)
62				}).morph(transition.to);
63
64				current.set('morph', {
65					link: 'cancel',
66					duration: this.options.duration.toInt(),
67					transition: 'quad:in:out'
68				}).morph(transition.from);
69			} else {
70				next.moofx(transition.to, {
71					duration: this.options.duration,
72					equation: this.options.curve,
73					callback: function(){
74						next.styles(Object.merge({}, transition.to, {position: 'relative'}));
75						current.styles(Object.merge({}, transition.from, {position: 'absolute'}));
76
77						if (settings.autoplay && settings.autoplay.toInt()) this.startTimer(container);
78					}.bind(this)
79				});
80
81				current.moofx(transition.from, {
82					duration: this.options.duration,
83					equation: this.options.curve
84				});
85			}
86
87		}
88
89	});
90
91	this.RokSprocket.Showcase = Showcase;
92
93})());

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.