Показать сообщение отдельно
Старый 29.10.2016, 14:20   #2868
duzzy
Гуру
 
Регистрация: 01.06.2013
Регион: 78, 98
Машина: SUBARU Impreza WRX
Сообщений: 1,766
duzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond reputeduzzy has a reputation beyond repute
По умолчанию

seriousstas

Это не обычный это сжатие

Ты сможешь это редактировать...
Код:
var smoothness = 0.3439; this.count = -1; this.draw_timer = false; this.hover = false; this.s1 = 0; this.s2 = 0; this.scroll_step = window.GetProperty(" Scroll - Mouse Wheel: Page Scroll", true); this.smooth = window.GetProperty(" Scroll: Smooth Scroll", true); this.timer_but = false;
    this.x; this.y; this.w; this.h; this.bar_ht = 0; this.but_h; this.bar_y = 0; this.row_count = 0; this.scroll = 0; this.delta = 0; this.ratio = 1; this.rows_drawn = 0; this.row_h; this.scrollbar_height = 0; this.scrollable_lines = 0; this.scrollbar_travel = 0;
    this.b_is_dragging = false; this.drag_distance_per_row; this.initial_drag_y = 0; // dragging
    this.draw = function(gr) {if (this.scrollable_lines > 0) {try {gr.FillSolidRect(this.x, this.y + this.bar_y, this.w, this.bar_ht, RGBA(200, 200, 200, !this.hover && !this.b_is_dragging ? 75 : 192));} catch (e) {}}}
    this.leave = function() {if (this.b_is_dragging) return; this.hover = false; this.hover_o = false; window.RepaintRect(this.x, this.y, this.w, this.h);}
    this.nearest = function(y) {y = (y - this.but_h) / this.scrollbar_height * this.scrollable_lines * this.row_h; y = y / this.row_h; y = Math.round(y) * this.row_h; return y;}
    this.reset = function() {this.delta = this.scroll = this.s1 = this.s2 = 0; this.metrics(this.x, this.y, this.w, this.h, this.rows_drawn, this.row_h);}
    this.scroll_timer = function() {var that = this; this.draw_timer = window.SetInterval(function() {if (p.w < 1 || !window.IsVisible) return; that.smooth_scroll();}, 16);}
    this.set_rows = function(row_count) {this.row_count = row_count; this.metrics(this.x, this.y, this.w, this.h, this.rows_drawn, this.row_h);}
    this.wheel = function(step) {this.check_scroll(this.scroll + step * - (this.scroll_step ? this.rows_drawn : 3) * this.row_h);}
Функции все не читабельные в одну строку...

Смотри этот же кусок кода в развернутом виде ...
Код:
var smoothness = 0.3439;
this.count = -1;
this.draw_timer = false;
this.hover = false;
this.s1 = 0;
this.s2 = 0;
this.scroll_step = window.GetProperty(" Scroll - Mouse Wheel: Page Scroll", true);
this.smooth = window.GetProperty(" Scroll: Smooth Scroll", true);
this.timer_but = false;
this.x;
this.y;
this.w;
this.h;
this.bar_ht = 0;
this.but_h;
this.bar_y = 0;
this.row_count = 0;
this.scroll = 0;
this.delta = 0;
this.ratio = 1;
this.rows_drawn = 0;
this.row_h;
this.scrollbar_height = 0;
this.scrollable_lines = 0;
this.scrollbar_travel = 0;
this.b_is_dragging = false;
this.drag_distance_per_row;
this.initial_drag_y = 0; // dragging
this.draw = function (gr) {
	if (this.scrollable_lines > 0) {
		try {
			gr.FillSolidRect(this.x, this.y + this.bar_y, this.w, this.bar_ht, RGBA(200, 200, 200, !this.hover && !this.b_is_dragging ? 75 : 192));
		} catch (e) {}
	}
}
this.leave = function () {
	if (this.b_is_dragging)
		return;
	this.hover = false;
	this.hover_o = false;
	window.RepaintRect(this.x, this.y, this.w, this.h);
}
this.nearest = function (y) {
	y = (y - this.but_h) / this.scrollbar_height * this.scrollable_lines * this.row_h;
	y = y / this.row_h;
	y = Math.round(y) * this.row_h;
	return y;
}
this.reset = function () {
	this.delta = this.scroll = this.s1 = this.s2 = 0;
	this.metrics(this.x, this.y, this.w, this.h, this.rows_drawn, this.row_h);
}
this.scroll_timer = function () {
	var that = this;
	this.draw_timer = window.SetInterval(function () {
			if (p.w < 1 || !window.IsVisible)
				return;
			that.smooth_scroll();
		}, 16);
}
this.set_rows = function (row_count) {
	this.row_count = row_count;
	this.metrics(this.x, this.y, this.w, this.h, this.rows_drawn, this.row_h);
}
this.wheel = function (step) {
	this.check_scroll(this.scroll + step *  - (this.scroll_step ? this.rows_drawn : 3) * this.row_h);
}
В моем варианте просто другой алгоритм сжатия, более сильный... а у Вилба более мягкий(видимо на сайте жал).
Но разница ощутимая даже когда в редактор скрипт грузишь, сжатый быстро, не сжатый на порядок медленнее.

Цитата:
Смотрю там на просьбы нет реакции, но я написал ..)
Я так понимаю он видимо для себя что то делает и просто выкладывает на тесты чтоб багулины править (хитрожопый Вилб))))
duzzy вне форума   Ответить с цитированием