PageSourceSearch

https://quaibranly.fr/typo3conf/ext/mqb_base/Resources/Public/Mont…/home/_components/greenwall.js?1776327123

js quaibranly.fr collected 2026-10-02 02:54:54 UTC 3,036 bytes, 127 lines download raw bytes

1var APP = APP || {};
2
3(function()
4{
5	"use strict";
6
7	APP.GreenWall = APP.Abstract.extend(
8	{
9		defaults : {
10
11		},
12
13		init : function(options,$container)
14		{
15			this._super(options);
16
17			this.$.container 	= $container;
18
19			this.$.button = $('.greenwall-button-link');
20			this.initButton();
21
22			this.$.background 	= this.$.container.find("div.background");
23
24			this.masks = [
25				this.$.container.find("div.mask"),
26				this.$.container.find("div.mask1"),
27				this.$.container.find("div.mask2"),
28				this.$.container.find("div.mask3")
29			];
30
31			this.wallHeight = $("#gmap").offset().top - $("#main").offset().top;
32			this.wallWidth = 25 / 9 * this.wallHeight;
33
34			this.resize();
35			this.initMasks();
36			this.initBackground();
37		},
38
39		/* ------------------------------------------------- */
40		/* ---  public remove */
41		/* ------------------------------------------------- */
42		remove : function()
43		{
44			this.off();
45			this.$.container.remove();
46		},
47
48		/* ------------------------------------------------- */
49		/* ---  public resize */
50		/* ------------------------------------------------- */
51		resize : function()
52		{
53			var that = this;
54			for (var i = 0; i < that.masks.length; i++) {
55				that.masks[i].stop();
56			}
57
58			var sizeCSSObject = {
59				height: that.wallHeight+"px",
60				width: that.wallWidth+"px",
61			};
62
63			$("#main").prepend(this.$.container);
64			this.$.container.css(sizeCSSObject);
65
66			for (var i = 0; i < this.masks.length; i++) {
67				this.masks[i].css(sizeCSSObject);
68			}
69		},
70
71		/* ------------------------------------------------- */
72		/* ---  private initMasks */
73		/* ------------------------------------------------- */
74		initMasks : function()
75		{
76			var that = this;
77
78			this.masks[0].css({
79				left : -that.wallWidth + 1 + that.wallWidth/2,
80				top : -that.wallHeight + 1 + that.wallHeight/2
81			});
82			this.masks[1].css({
83				left : 0 + that.wallWidth/2,
84				top : -that.wallHeight + that.wallHeight/2
85			});
86			this.masks[2].css({
87				left : -that.wallWidth + that.wallWidth/2,
88				top : 0 + that.wallHeight/2
89			});
90			this.masks[3].css({
91				left : 0 + that.wallWidth/2,
92				top : 0 + that.wallHeight/2
93			})
94		},
95
96		/* ------------------------------------------------- */
97		/* ---  private initBackground */
98		/* ------------------------------------------------- */
99		initBackground : function()
100		{
101			this.$.background.show();
102		},
103
104		/* ------------------------------------------------- */
105		/* ---  private initAnimation */
106		/* ------------------------------------------------- */
107		initAnimation : function()
108		{
109			var that = this
110			for (var i = 0; i < that.masks.length; i++) {
111				that.masks[i].animate({
112					left: "+=" + 2*(that.wallWidth - that.wallWidth/2),
113					top: "+=" + 2*(that.wallHeight - that.wallHeight/2)
114				},45000);
115			}
116		},
117
118		/* ------------------------------------------------- */
119		/* ---  private initButton */
120		/* ------------------------------------------------- */
121		initButton : function()
122		{
123			var that = this;
124			$("#main").prepend(that.$.button);
125		}
126	});
127 }());

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.