PageSourceSearch

https://carcam.ru/local/templates/carcamnew/js/aspro_animate_open_fancy.js

js carcam.ru collected 2026-10-02 14:32:31 UTC 1,916 bytes, 52 lines download raw bytes

1function retrieveScale(btn) {
2	var btnRadius = btn.width()/2,
3		left = btn.offset().left + btnRadius,
4		top = btn.offset().top + btnRadius - $(window).scrollTop(),
5		scale = scaleValue(top, left, btnRadius, $(window).height(), $(window).width());
6
7	btn.css('position', 'fixed').velocity({
8		top: top - btnRadius,
9		left: left - btnRadius,
10		translateX: 0,
11	}, 0);
12
13	return scale;
14}
15
16function scaleValue( topValue, leftValue, radiusValue, windowW, windowH) {
17	var maxDistHor = ( leftValue > windowW/2) ? leftValue : (windowW - leftValue),
18		maxDistVert = ( topValue > windowH/2) ? topValue : (windowH - topValue);
19	return Math.ceil(Math.sqrt( Math.pow(maxDistHor, 2) + Math.pow(maxDistVert, 2) )/radiusValue);
20}
21
22function animateLayer(layer, scaleVal, bool) {
23	layer.velocity({ scale: scaleVal }, 400, function(){
24		$('body').toggleClass('overflow-hidden', bool);
25		(bool)
26			? layer.parents('.cd-section').addClass('modal-is-visible').end().off('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend')
27			: layer.removeClass('is-visible').removeAttr( 'style' ).siblings('[data-type="modal-trigger"]').removeClass('to-circle');
28	});
29}
30
31function updateLayer() {
32	var layer = $('.cd-section.modal-is-visible .cd-modal-bg'),
33		layerRadius = layer.width()/2,
34		layerTop = layer.siblings('.btn').offset().top + layerRadius - $(window).scrollTop(),
35		layerLeft = layer.siblings('.btn').offset().left + layerRadius,
36		scale = scaleValue(layerTop, layerLeft, layerRadius, $(window).height(), $(window).width());
37
38	layer.velocity({
39		top: layerTop - layerRadius,
40		left: layerLeft - layerRadius,
41		scale: scale,
42	}, 0);
43}
44
45function closeModal() {
46	$('.cd-modal-bg').fadeOut();
47	animateLayer($('.cd-modal-bg'), 1, false);
48	//$('.cd-modal-bg').removeAttr('style');
49	//setTimeout(function(){
50		$('.cd-modal-bg').removeClass('is-visible');
51	//}, 510);
52}

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.