From e101a313165c654f9f310637d81cb9e415787b38 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 19 Jul 2018 15:56:55 +0800 Subject: [PATCH] =?UTF-8?q?DEC-2635=20=E3=80=90=E9=9B=86=E7=BE=A4=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E9=9D=A2=E3=80=91=E9=80=89=E6=8B=A9=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE/=E7=BC=96=E7=A0=81=E6=97=B6=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=EF=BC=8C=E9=A1=B5=E9=9D=A2=E8=B7=9F=E9=9A=8F?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/js/case/combo/demo.text_value_combo.js | 48 ++++++++++++++++++ .../multiselect/demo.multi_select_tree.js | 2 +- dist/base.js | 10 +++- dist/bundle.js | 10 +++- dist/demo.js | 50 ++++++++++++++++++- dist/fineui.js | 10 +++- src/base/layer/layer.popup.js | 10 +++- 7 files changed, 130 insertions(+), 10 deletions(-) diff --git a/demo/js/case/combo/demo.text_value_combo.js b/demo/js/case/combo/demo.text_value_combo.js index b31181509..996650fd8 100644 --- a/demo/js/case/combo/demo.text_value_combo.js +++ b/demo/js/case/combo/demo.text_value_combo.js @@ -29,6 +29,54 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, { text: "MVC-3", iconCls: "pull-right-font", value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 }] }, { type: "bi.search_multi_text_value_combo", diff --git a/demo/js/widget/multiselect/demo.multi_select_tree.js b/demo/js/widget/multiselect/demo.multi_select_tree.js index 1869398ea..70308042d 100644 --- a/demo/js/widget/multiselect/demo.multi_select_tree.js +++ b/demo/js/widget/multiselect/demo.multi_select_tree.js @@ -13,7 +13,7 @@ Demo.MultiSelectList = BI.inherit(BI.Widget, { _createMultiSelectCombo: function () { var self = this; var widget = BI.createWidget({ - type: "bi.multi_select_insert_no_bar_list", + type: "bi.multi_select_insert_list", ref: function (ref) { self.list = ref; }, diff --git a/dist/base.js b/dist/base.js index 3ccf276b4..e8a72e0e2 100644 --- a/dist/base.js +++ b/dist/base.js @@ -15622,8 +15622,14 @@ BI.PopupView = BI.inherit(BI.Widget, { _init: function () { BI.PopupView.superclass._init.apply(this, arguments); var self = this, o = this.options; + this.wheelHandler = new BI.WheelHandler(function (deltaX, deltaY) { + var scrollTop = self.button_group.element.scrollTop(); + scrollTop += deltaY; + self.button_group.element.scrollTop(scrollTop); + }, false, true); var fn = function (e) { - e.stopPropagation(); + self.wheelHandler.onWheel(e.originalEvent); + e.stopEvent(); }, stop = function (e) { e.stopEvent(); return false; @@ -15634,7 +15640,7 @@ BI.PopupView = BI.inherit(BI.Widget, { "max-width": o.maxWidth + "px" }).bind({click: fn}); - this.element.bind("mousewheel", fn); + this.element.bind("mousewheel", BI.bind(fn, this)); o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn}); o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop}); diff --git a/dist/bundle.js b/dist/bundle.js index 797806292..8804a59aa 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -51430,8 +51430,14 @@ BI.PopupView = BI.inherit(BI.Widget, { _init: function () { BI.PopupView.superclass._init.apply(this, arguments); var self = this, o = this.options; + this.wheelHandler = new BI.WheelHandler(function (deltaX, deltaY) { + var scrollTop = self.button_group.element.scrollTop(); + scrollTop += deltaY; + self.button_group.element.scrollTop(scrollTop); + }, false, true); var fn = function (e) { - e.stopPropagation(); + self.wheelHandler.onWheel(e.originalEvent); + e.stopEvent(); }, stop = function (e) { e.stopEvent(); return false; @@ -51442,7 +51448,7 @@ BI.PopupView = BI.inherit(BI.Widget, { "max-width": o.maxWidth + "px" }).bind({click: fn}); - this.element.bind("mousewheel", fn); + this.element.bind("mousewheel", BI.bind(fn, this)); o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn}); o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop}); diff --git a/dist/demo.js b/dist/demo.js index cd3489205..f20a3ec64 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -2228,6 +2228,54 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, { text: "MVC-3", iconCls: "pull-right-font", value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 }] }, { type: "bi.search_multi_text_value_combo", @@ -12853,7 +12901,7 @@ Demo.MultiSelectList = BI.inherit(BI.Widget, { _createMultiSelectCombo: function () { var self = this; var widget = BI.createWidget({ - type: "bi.multi_select_insert_no_bar_list", + type: "bi.multi_select_insert_list", ref: function (ref) { self.list = ref; }, diff --git a/dist/fineui.js b/dist/fineui.js index b0e9dd5cc..27902d4de 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -51679,8 +51679,14 @@ BI.PopupView = BI.inherit(BI.Widget, { _init: function () { BI.PopupView.superclass._init.apply(this, arguments); var self = this, o = this.options; + this.wheelHandler = new BI.WheelHandler(function (deltaX, deltaY) { + var scrollTop = self.button_group.element.scrollTop(); + scrollTop += deltaY; + self.button_group.element.scrollTop(scrollTop); + }, false, true); var fn = function (e) { - e.stopPropagation(); + self.wheelHandler.onWheel(e.originalEvent); + e.stopEvent(); }, stop = function (e) { e.stopEvent(); return false; @@ -51691,7 +51697,7 @@ BI.PopupView = BI.inherit(BI.Widget, { "max-width": o.maxWidth + "px" }).bind({click: fn}); - this.element.bind("mousewheel", fn); + this.element.bind("mousewheel", BI.bind(fn, this)); o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn}); o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop}); diff --git a/src/base/layer/layer.popup.js b/src/base/layer/layer.popup.js index 8366e36ed..cc92a06c1 100644 --- a/src/base/layer/layer.popup.js +++ b/src/base/layer/layer.popup.js @@ -44,8 +44,14 @@ BI.PopupView = BI.inherit(BI.Widget, { _init: function () { BI.PopupView.superclass._init.apply(this, arguments); var self = this, o = this.options; + this.wheelHandler = new BI.WheelHandler(function (deltaX, deltaY) { + var scrollTop = self.button_group.element.scrollTop(); + scrollTop += deltaY; + self.button_group.element.scrollTop(scrollTop); + }, false, true); var fn = function (e) { - e.stopPropagation(); + self.wheelHandler.onWheel(e.originalEvent); + e.stopEvent(); }, stop = function (e) { e.stopEvent(); return false; @@ -56,7 +62,7 @@ BI.PopupView = BI.inherit(BI.Widget, { "max-width": o.maxWidth + "px" }).bind({click: fn}); - this.element.bind("mousewheel", fn); + this.element.bind("mousewheel", BI.bind(fn, this)); o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn}); o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop});