Browse Source

整理

master
guy 8 years ago
parent
commit
4635f5d887
  1. 17
      bi/widget.js
  2. 17
      dist/widget.js
  3. 4
      src/widget/adaptivearrangement/adaptivearrangement.js
  4. 9
      src/widget/arrangement/arrangement.js
  5. 4
      src/widget/interactivearrangement/interactivearrangement.js

17
bi/widget.js

@ -416,6 +416,9 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
layoutType: o.layoutType,
items: o.items
});
this.arrangement.on(BI.Arrangement.EVENT_SCROLL, function () {
self.fireEvent(BI.AdaptiveArrangement.EVENT_SCROLL, arguments);
});
if (o.isNeedResizeContainer) {
var isResizing = false;
@ -906,6 +909,7 @@ BI.AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE = "AdaptiveArrangement.EVENT_E
BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE = "AdaptiveArrangement.EVENT_ELEMENT_RESIZE";
BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE = "AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE";
BI.AdaptiveArrangement.EVENT_RESIZE = "AdaptiveArrangement.EVENT_RESIZE";
BI.AdaptiveArrangement.EVENT_SCROLL = "AdaptiveArrangement.EVENT_SCROLL";
BI.shortcut('bi.adaptive_arrangement', BI.AdaptiveArrangement);/**
* Arrangement的block面板
*
@ -1001,6 +1005,14 @@ BI.Arrangement = BI.inherit(BI.Widget, {
scrollable: true,
items: [this.container]
});
this.scrollContainer.element.scroll(function () {
self.fireEvent(BI.Arrangement.EVENT_SCROLL, {
scrollLeft: self.scrollContainer.element.scrollLeft(),
scrollTop: self.scrollContainer.element.scrollTop(),
clientWidth: self.scrollContainer.element[0].clientWidth,
clientHeight: self.scrollContainer.element[0].clientHeight
});
});
BI.createWidget({
type: "bi.adaptive",
@ -3873,6 +3885,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
this._renderRegion();
}
});
BI.Arrangement.EVENT_SCROLL = "EVENT_SCROLL";
BI.extend(BI.Arrangement, {
PORTION: 24,
GRID_HEIGHT: 50,
@ -7140,6 +7153,9 @@ BI.InteractiveArrangement = BI.inherit(BI.Widget, {
layoutType: o.layoutType,
items: o.items
});
this.arrangement.on(BI.AdaptiveArrangement.EVENT_SCROLL, function () {
self.fireEvent(BI.InteractiveArrangement.EVENT_SCROLL, arguments);
});
this.arrangement.on(BI.AdaptiveArrangement.EVENT_RESIZE, function () {
self.fireEvent(BI.InteractiveArrangement.EVENT_RESIZE, arguments);
});
@ -7677,6 +7693,7 @@ BI.InteractiveArrangement = BI.inherit(BI.Widget, {
}
});
BI.InteractiveArrangement.EVENT_RESIZE = "InteractiveArrangement.EVENT_RESIZE";
BI.InteractiveArrangement.EVENT_SCROLL = "InteractiveArrangement.EVENT_SCROLL";
BI.shortcut('bi.interactive_arrangement', BI.InteractiveArrangement);/**
* 月份下拉框
*

17
dist/widget.js vendored

@ -416,6 +416,9 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
layoutType: o.layoutType,
items: o.items
});
this.arrangement.on(BI.Arrangement.EVENT_SCROLL, function () {
self.fireEvent(BI.AdaptiveArrangement.EVENT_SCROLL, arguments);
});
if (o.isNeedResizeContainer) {
var isResizing = false;
@ -906,6 +909,7 @@ BI.AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE = "AdaptiveArrangement.EVENT_E
BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE = "AdaptiveArrangement.EVENT_ELEMENT_RESIZE";
BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE = "AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE";
BI.AdaptiveArrangement.EVENT_RESIZE = "AdaptiveArrangement.EVENT_RESIZE";
BI.AdaptiveArrangement.EVENT_SCROLL = "AdaptiveArrangement.EVENT_SCROLL";
BI.shortcut('bi.adaptive_arrangement', BI.AdaptiveArrangement);/**
* Arrangement的block面板
*
@ -1001,6 +1005,14 @@ BI.Arrangement = BI.inherit(BI.Widget, {
scrollable: true,
items: [this.container]
});
this.scrollContainer.element.scroll(function () {
self.fireEvent(BI.Arrangement.EVENT_SCROLL, {
scrollLeft: self.scrollContainer.element.scrollLeft(),
scrollTop: self.scrollContainer.element.scrollTop(),
clientWidth: self.scrollContainer.element[0].clientWidth,
clientHeight: self.scrollContainer.element[0].clientHeight
});
});
BI.createWidget({
type: "bi.adaptive",
@ -3873,6 +3885,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
this._renderRegion();
}
});
BI.Arrangement.EVENT_SCROLL = "EVENT_SCROLL";
BI.extend(BI.Arrangement, {
PORTION: 24,
GRID_HEIGHT: 50,
@ -7140,6 +7153,9 @@ BI.InteractiveArrangement = BI.inherit(BI.Widget, {
layoutType: o.layoutType,
items: o.items
});
this.arrangement.on(BI.AdaptiveArrangement.EVENT_SCROLL, function () {
self.fireEvent(BI.InteractiveArrangement.EVENT_SCROLL, arguments);
});
this.arrangement.on(BI.AdaptiveArrangement.EVENT_RESIZE, function () {
self.fireEvent(BI.InteractiveArrangement.EVENT_RESIZE, arguments);
});
@ -7677,6 +7693,7 @@ BI.InteractiveArrangement = BI.inherit(BI.Widget, {
}
});
BI.InteractiveArrangement.EVENT_RESIZE = "InteractiveArrangement.EVENT_RESIZE";
BI.InteractiveArrangement.EVENT_SCROLL = "InteractiveArrangement.EVENT_SCROLL";
BI.shortcut('bi.interactive_arrangement', BI.InteractiveArrangement);/**
* 月份下拉框
*

4
src/widget/adaptivearrangement/adaptivearrangement.js

@ -34,6 +34,9 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
layoutType: o.layoutType,
items: o.items
});
this.arrangement.on(BI.Arrangement.EVENT_SCROLL, function () {
self.fireEvent(BI.AdaptiveArrangement.EVENT_SCROLL, arguments);
});
if (o.isNeedResizeContainer) {
var isResizing = false;
@ -524,4 +527,5 @@ BI.AdaptiveArrangement.EVENT_ELEMENT_START_RESIZE = "AdaptiveArrangement.EVENT_E
BI.AdaptiveArrangement.EVENT_ELEMENT_RESIZE = "AdaptiveArrangement.EVENT_ELEMENT_RESIZE";
BI.AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE = "AdaptiveArrangement.EVENT_ELEMENT_STOP_RESIZE";
BI.AdaptiveArrangement.EVENT_RESIZE = "AdaptiveArrangement.EVENT_RESIZE";
BI.AdaptiveArrangement.EVENT_SCROLL = "AdaptiveArrangement.EVENT_SCROLL";
BI.shortcut('bi.adaptive_arrangement', BI.AdaptiveArrangement);

9
src/widget/arrangement/arrangement.js

@ -51,6 +51,14 @@ BI.Arrangement = BI.inherit(BI.Widget, {
scrollable: true,
items: [this.container]
});
this.scrollContainer.element.scroll(function () {
self.fireEvent(BI.Arrangement.EVENT_SCROLL, {
scrollLeft: self.scrollContainer.element.scrollLeft(),
scrollTop: self.scrollContainer.element.scrollTop(),
clientWidth: self.scrollContainer.element[0].clientWidth,
clientHeight: self.scrollContainer.element[0].clientHeight
});
});
BI.createWidget({
type: "bi.adaptive",
@ -2923,6 +2931,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
this._renderRegion();
}
});
BI.Arrangement.EVENT_SCROLL = "EVENT_SCROLL";
BI.extend(BI.Arrangement, {
PORTION: 24,
GRID_HEIGHT: 50,

4
src/widget/interactivearrangement/interactivearrangement.js

@ -31,6 +31,9 @@ BI.InteractiveArrangement = BI.inherit(BI.Widget, {
layoutType: o.layoutType,
items: o.items
});
this.arrangement.on(BI.AdaptiveArrangement.EVENT_SCROLL, function () {
self.fireEvent(BI.InteractiveArrangement.EVENT_SCROLL, arguments);
});
this.arrangement.on(BI.AdaptiveArrangement.EVENT_RESIZE, function () {
self.fireEvent(BI.InteractiveArrangement.EVENT_RESIZE, arguments);
});
@ -568,4 +571,5 @@ BI.InteractiveArrangement = BI.inherit(BI.Widget, {
}
});
BI.InteractiveArrangement.EVENT_RESIZE = "InteractiveArrangement.EVENT_RESIZE";
BI.InteractiveArrangement.EVENT_SCROLL = "InteractiveArrangement.EVENT_SCROLL";
BI.shortcut('bi.interactive_arrangement', BI.InteractiveArrangement);
Loading…
Cancel
Save