Commit 3d58a574 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Правка для scroll

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53412 954022d7-b5bf-4e40-9824-e11837661b57
parent 73d508e8
......@@ -31,8 +31,10 @@
this.handlers = undefined;
this.settings = $.extend(true, {}, this.defaults);
this.vsb = undefined;
this.vsbHSt = undefined;
this.vsbApi = undefined;
this.hsb = undefined;
this.hsbHSt = undefined;
this.hsbApi = undefined;
this.resizeTimerId = undefined;
this.scrollTimerId = undefined;
......@@ -215,13 +217,13 @@
if (isVert || isHoriz) {
this.handlers.trigger("reinitializeScroll", whichSB, function (vSize, hSize) {
if (isVert) {
var vsHelperH = $(self.vsb).outerHeight() + Math.max(vSize * opt.vscrollStep, 1);
$(self.vsb).find("#ws-v-scroll-helper").height(vsHelperH);
vSize = self.vsb.offsetHeight + Math.max(vSize * opt.vscrollStep, 1);
self.vsbHSt.height = vSize + "px";
self.vsbApi.Reinit(opt, opt.vscrollStep * ws.getFirstVisibleRow(/*allowPane*/true));
}
if (isHoriz) {
var hsHelperW = $(self.hsb).outerWidth() + Math.max(hSize * opt.hscrollStep, 1);
$(self.hsb).find("#ws-h-scroll-helper").width(hsHelperW);
hSize = self.hsb.offsetWidth + Math.max(hSize * opt.hscrollStep, 1);
self.hsbHSt.width = hSize + "px";
self.hsbApi.Reinit(opt, opt.vscrollStep * ws.getFirstVisibleCol(/*allowPane*/true));
}
});
......@@ -294,6 +296,7 @@
this.vsb.id = "ws-v-scrollbar";
this.vsb.innerHTML = '<div id="ws-v-scroll-helper"></div>';
this.widget.appendChild(this.vsb);
this.vsbHSt = document.getElementById("ws-v-scroll-helper").style;
if (!this.vsbApi) {
this.vsbApi = new ScrollObject(this.vsb.id, opt);
......@@ -322,6 +325,7 @@
this.hsb.id = "ws-h-scrollbar";
this.hsb.innerHTML = '<div id="ws-h-scroll-helper"></div>';
this.widget.appendChild(this.hsb);
this.hsbHSt = document.getElementById("ws-h-scroll-helper").style;
if (!this.hsbApi) {
this.hsbApi = new ScrollObject(this.hsb.id, $.extend(true, {}, opt, {wheelScrollLines: 1}));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment