Browse Source

布局

master
guy 8 years ago
parent
commit
0cd6440242
  1. 28
      bi/widget.js
  2. 28
      docs/widget.js
  3. 4
      src/widget/adaptivearrangement/adaptivearrangement.js
  4. 4
      src/widget/arrangement/arrangement.js
  5. 20
      src/widget/interactivearrangement/interactivearrangement.js

28
bi/widget.js

@ -600,8 +600,8 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
return this.arrangement.setRegionPosition(name, position);
},
setDropPosition: function (position) {
return this.arrangement.setDropPosition(position);
setDropPosition: function (position, size) {
return this.arrangement.setDropPosition(position, size);
},
scrollInterval: function (e, isBorderScroll, isOverflowScroll, cb) {
@ -1661,10 +1661,10 @@ BI.Arrangement = BI.inherit(BI.Widget, {
}
},
setDropPosition: function (position) {
setDropPosition: function (position, size) {
var self = this;
this.arrangement.setVisible(true);
this._setArrangeSize(position);
this._setArrangeSize(BI.extend({}, position, size));
return function () {
self.arrangement.setVisible(false);
}
@ -5568,8 +5568,24 @@ BI.InteractiveArrangement = BI.inherit(BI.Widget, {
return this.arrangement.setRegionPosition(name, position);
},
setDropPosition: function (position) {
return this.arrangement.setDropPosition(position);
setDropPosition: function (position, size) {
var self = this;
this.stopDraw();
if (position.left > 0 && position.top > 0) {
switch (this.getLayoutType()) {
case BI.Arrangement.LAYOUT_TYPE.FREE:
position = this.getPosition(null, position, size);
this.draw(position, size);
break;
case BI.Arrangement.LAYOUT_TYPE.GRID:
break;
}
}
var callback = self.arrangement.setDropPosition(position, size);
return function () {
callback();
self.stopDraw();
}
},
scrollInterval: function () {

28
docs/widget.js

@ -600,8 +600,8 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
return this.arrangement.setRegionPosition(name, position);
},
setDropPosition: function (position) {
return this.arrangement.setDropPosition(position);
setDropPosition: function (position, size) {
return this.arrangement.setDropPosition(position, size);
},
scrollInterval: function (e, isBorderScroll, isOverflowScroll, cb) {
@ -1661,10 +1661,10 @@ BI.Arrangement = BI.inherit(BI.Widget, {
}
},
setDropPosition: function (position) {
setDropPosition: function (position, size) {
var self = this;
this.arrangement.setVisible(true);
this._setArrangeSize(position);
this._setArrangeSize(BI.extend({}, position, size));
return function () {
self.arrangement.setVisible(false);
}
@ -5568,8 +5568,24 @@ BI.InteractiveArrangement = BI.inherit(BI.Widget, {
return this.arrangement.setRegionPosition(name, position);
},
setDropPosition: function (position) {
return this.arrangement.setDropPosition(position);
setDropPosition: function (position, size) {
var self = this;
this.stopDraw();
if (position.left > 0 && position.top > 0) {
switch (this.getLayoutType()) {
case BI.Arrangement.LAYOUT_TYPE.FREE:
position = this.getPosition(null, position, size);
this.draw(position, size);
break;
case BI.Arrangement.LAYOUT_TYPE.GRID:
break;
}
}
var callback = self.arrangement.setDropPosition(position, size);
return function () {
callback();
self.stopDraw();
}
},
scrollInterval: function () {

4
src/widget/adaptivearrangement/adaptivearrangement.js

@ -181,8 +181,8 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
return this.arrangement.setRegionPosition(name, position);
},
setDropPosition: function (position) {
return this.arrangement.setDropPosition(position);
setDropPosition: function (position, size) {
return this.arrangement.setDropPosition(position, size);
},
scrollInterval: function (e, isBorderScroll, isOverflowScroll, cb) {

4
src/widget/arrangement/arrangement.js

@ -867,10 +867,10 @@ BI.Arrangement = BI.inherit(BI.Widget, {
}
},
setDropPosition: function (position) {
setDropPosition: function (position, size) {
var self = this;
this.arrangement.setVisible(true);
this._setArrangeSize(position);
this._setArrangeSize(BI.extend({}, position, size));
return function () {
self.arrangement.setVisible(false);
}

20
src/widget/interactivearrangement/interactivearrangement.js

@ -512,8 +512,24 @@ BI.InteractiveArrangement = BI.inherit(BI.Widget, {
return this.arrangement.setRegionPosition(name, position);
},
setDropPosition: function (position) {
return this.arrangement.setDropPosition(position);
setDropPosition: function (position, size) {
var self = this;
this.stopDraw();
if (position.left > 0 && position.top > 0) {
switch (this.getLayoutType()) {
case BI.Arrangement.LAYOUT_TYPE.FREE:
position = this.getPosition(null, position, size);
this.draw(position, size);
break;
case BI.Arrangement.LAYOUT_TYPE.GRID:
break;
}
}
var callback = self.arrangement.setDropPosition(position, size);
return function () {
callback();
self.stopDraw();
}
},
scrollInterval: function () {

Loading…
Cancel
Save