提交 5dc03291 编写于 作者: NoSubject's avatar NoSubject

Merge branch 'fix/menu_scroll_error' into 'develop'

Merge of fix/menu_scroll_error to develop 修复滚动条出现错误的bug

See merge request o2oa/o2oa!439
......@@ -37,6 +37,7 @@
"gulp-tm-asset-rev": "0.0.16",
"gulp-tm-uglify": "3.0.1",
"merge-stream": "^1.0.1",
"minimist": "^1.2.0"
"minimist": "^1.2.0",
"gulp-sftp-up4": "^0.1.8"
}
}
......@@ -347,7 +347,7 @@ o2.widget.ScrollBar = new Class({
var clientSize = this.node.getSize();
var nodePosition = this.node.getPosition(this.node.getOffsetParent());
this.mousewheel = function(e){
if (!this.mousewheel) this.mousewheel = function(e){
var delta = 1-e.event.wheelDelta;
var step = ((this.options.distance.toFloat())/100)*(clientSize.y.toFloat());
......@@ -356,7 +356,7 @@ o2.widget.ScrollBar = new Class({
this.scroll(delta, null);
e.stopPropagation();
}.bind(this);
this.domMousewheel = function(e){
if (!this.domMousewheel) this.domMousewheel = function(e){
var delta = e.detail;
var step = ((this.options.distance.toFloat())/100)*(clientSize.y.toFloat());
......@@ -366,7 +366,7 @@ o2.widget.ScrollBar = new Class({
e.stopPropagation();
}.bind(this);
this.touchmove = function(e){
if (!this.touchmove) this.touchmove = function(e){
var delta = e.event.detail;
var step = ((this.options.distance.toFloat())/100)*(clientSize.y.toFloat());
......@@ -413,12 +413,15 @@ o2.widget.ScrollBar = new Class({
this.setScrollVNodeMove();
this.node.addEvent("mousewheel", this.mousewheel);
this.node.addEvent("touchmove", this.touchmove);
if (Browser.name=="firefox"){
this.node.addEventListener("DOMMouseScroll", this.domMousewheel, false);
if (!this.isAddEvent){
this.node.addEvent("mousewheel", this.mousewheel);
this.node.addEvent("touchmove", this.touchmove);
if (Browser.name=="firefox"){
this.node.addEventListener("DOMMouseScroll", this.domMousewheel, false);
}
this.isAddEvent = true
}
// this.node DOMMouseScroll
}
if (this.scrollVAreaNode.getStyle("position")=="absolute"){
......@@ -469,9 +472,10 @@ o2.widget.ScrollBar = new Class({
// this.node.tween("margin-right", margin-scrollVNodeSize.x);
}
this.node.removeEvents("mousewheel", this.mousewheel);
this.node.removeEvent("mousewheel", this.mousewheel);
this.node.removeEvent("touchmove", this.touchmove);
if (Browser.name=="firefox"){
this.node.addEventListener("DOMMouseScroll", this.domMousewheel, false);
this.node.removeEventListener("DOMMouseScroll", this.domMousewheel, false);
}
}
// if (scrollSize.x>scrollSize.x){
......@@ -496,6 +500,9 @@ o2.widget.ScrollBar = new Class({
if (this.checkScrollShowFun) document.body.removeEvent("mousemove", this.checkScrollShowFun);
if (this.mousewheel) this.node.removeEvent("mousewheel", this.mousewheel);
if (this.touchmove) this.node.removeEvent("touchmove", this.touchmove);
if (Browser.name=="firefox"){
if (this.domMousewheel) this.node.removeEventListener("DOMMouseScroll", this.domMousewheel, false);
}
if (this.scrollVAreaNode) this.scrollVAreaNode.destroy();
if (this.scrollVNode) this.scrollVNode.destroy();
o2.release(this);
......
.o2_homepage_content {
margin: 15px;
min-width: 1000px;
min-height: 600px;
min-width: 1280px;
min-height: 700px;
font-size: 14px;
}
.o2_homepage_layout_right {
......
......@@ -397,7 +397,6 @@ MWF.xApplication.Homepage.TaskContent.Task = new Class({
"click": function () { this.nextPage(); }.bind(this),
});
debugger;
var size = this.pageNode.getSize();
var w1 = this.prevPageNode.getEdgeWidth();
var w2 = this.nextPageNode.getEdgeWidth();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册