PageSourceSearch

https://www.obectucapy.cz/bundles/headerfooter/js/slideshow2/js/slideshow.fold.js?v=v6.5.0

js obectucapy.cz collected 2026-10-03 18:04:39 UTC 3,132 bytes, 86 lines download raw bytes

1/**
2Script: Slideshow.Fold.js
3	Slideshow.Fold - Flash extension for Slideshow.
4
5License:
6	MIT-style license.
7
8Copyright:
9	Copyright (c) 2008 [Aeron Glemann](http://www.electricprism.com/aeron/).
10
11Dependencies:
12	Slideshow.
13*/
14
15Slideshow.Fold = new Class({
16    Extends: Slideshow,
17
18    /**
19Private method: show
20	Does the slideshow effect.
21*/
22
23    _show: function (fast) {
24        if (!this.image.retrieve('tween')) {
25            var options = this.options.overlap
26                ? { duration: this.options.duration }
27                : { duration: this.options.duration / 2 };
28            $$(this.a, this.b).set(
29                'tween',
30                Object.merge(options, {
31                    link: 'chain',
32                    onStart: this._start.bind(this),
33                    onComplete: this._complete.bind(this),
34                    property: 'clip',
35                    transition: this.options.transition,
36                }),
37            );
38        }
39        var img = this.counter % 2 ? this.a : this.b,
40            rect = this._rect(this.image),
41            half = Math.ceil(rect.top + (rect.bottom - rect.top) / 2);
42
43        if (fast) {
44            img.get('tween').cancel().set('rect(0, 0, 0, 0)');
45            this.image.get('tween').cancel().set('rect(auto, auto, auto, auto)');
46        } else {
47            if (this.options.overlap) {
48                img.get('tween').set('rect(auto, auto, auto, auto)');
49                this.image
50                    .get('tween')
51                    .set(rect.top + ' ' + rect.left + ' ' + half + ' ' + rect.left)
52                    .start(rect.top + ' ' + rect.right + ' ' + half + ' ' + rect.left)
53                    .start(rect.top + ' ' + rect.right + ' ' + rect.bottom + ' ' + rect.left);
54            } else {
55                var fn = function (rect) {
56                    this.image
57                        .get('tween')
58                        .set(rect.top + ' ' + rect.left + ' ' + half + ' ' + rect.left)
59                        .start(rect.top + ' ' + rect.right + ' ' + half + ' ' + rect.left)
60                        .start(rect.top + ' ' + rect.right + ' ' + rect.bottom + ' ' + rect.left);
61                }.pass(rect, this);
62                if (this.firstrun) return fn();
63                rect = this._rect(img);
64                img.get('tween')
65                    .set(rect.top + ' ' + rect.right + ' ' + rect.bottom + ' ' + rect.left)
66                    .start(rect.top + ' ' + rect.right + ' ' + half + ' ' + rect.left)
67                    .start(rect.top + ' ' + rect.left + ' ' + half + ' ' + rect.left)
68                    .chain(fn);
69            }
70        }
71    },
72
73    /**
74	Private method: rect
75		Calculates the clipping rect
76	*/
77
78    _rect: function (img) {
79        var rect = img.getCoordinates(this.el.retrieve('images'));
80        rect.left = rect.left < 0 ? Math.abs(rect.left) : 0;
81        rect.top = rect.top < 0 ? Math.abs(rect.top) : 0;
82        rect.right = rect.right > this.width ? rect.left + this.width : rect.width;
83        rect.bottom = rect.bottom > this.height ? rect.top + this.height : rect.height;
84        return rect;
85    },
86});

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.