guy 7 years ago
parent
commit
c528ce12c6
  1. 25
      bi/widget.js
  2. 25
      docs/widget.js
  3. 4
      src/widget/adaptivearrangement/adaptivearrangement.js
  4. 21
      src/widget/arrangement/arrangement.js

25
bi/widget.js

@ -458,9 +458,9 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
self._initResizable(item.el);
});
this.element.mousedown(function (e) {
$(document).mousedown(function (e) {
BI.each(self.getAllRegions(), function (i, region) {
if (!region.el.element.__isMouseInBounds__(e)) {
if (region.el.element.find(e.target).length === 0) {
region.el.element.removeClass("selected");
}
});
@ -1160,15 +1160,15 @@ BI.Arrangement = BI.inherit(BI.Widget, {
var leftPortion = Math.round(position.left / perWidth);
var topPortion = Math.round(position.top / perHeight);
var heightPortion = Math.round(position.height / perHeight);
if (leftPortion > BI.Arrangement.PORTION) {
leftPortion = BI.Arrangement.PORTION;
}
if (widthPortion > BI.Arrangement.PORTION) {
widthPortion = BI.Arrangement.PORTION;
}
if (leftPortion + widthPortion > BI.Arrangement.PORTION) {
leftPortion = BI.Arrangement.PORTION - widthPortion;
}
// if (leftPortion > BI.Arrangement.PORTION) {
// leftPortion = BI.Arrangement.PORTION;
// }
// if (widthPortion > BI.Arrangement.PORTION) {
// widthPortion = BI.Arrangement.PORTION;
// }
// if (leftPortion + widthPortion > BI.Arrangement.PORTION) {
// leftPortion = BI.Arrangement.PORTION - widthPortion;
// }
if (widthPortion === 0) {
widthPortion = 1;
}
@ -1735,7 +1735,6 @@ BI.Arrangement = BI.inherit(BI.Widget, {
resize: function () {
var self = this, o = this.options;
var occupied = this._applyContainer();
switch (o.layoutType) {
case BI.Arrangement.LAYOUT_TYPE.FREE:
break;
@ -1828,7 +1827,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
});
BI.Arrangement.EVENT_SCROLL = "EVENT_SCROLL";
BI.extend(BI.Arrangement, {
PORTION: 32,
PORTION: 36,
H_PORTION: 18,
LAYOUT_TYPE: {
GRID: 0,

25
docs/widget.js

@ -458,9 +458,9 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
self._initResizable(item.el);
});
this.element.mousedown(function (e) {
$(document).mousedown(function (e) {
BI.each(self.getAllRegions(), function (i, region) {
if (!region.el.element.__isMouseInBounds__(e)) {
if (region.el.element.find(e.target).length === 0) {
region.el.element.removeClass("selected");
}
});
@ -1160,15 +1160,15 @@ BI.Arrangement = BI.inherit(BI.Widget, {
var leftPortion = Math.round(position.left / perWidth);
var topPortion = Math.round(position.top / perHeight);
var heightPortion = Math.round(position.height / perHeight);
if (leftPortion > BI.Arrangement.PORTION) {
leftPortion = BI.Arrangement.PORTION;
}
if (widthPortion > BI.Arrangement.PORTION) {
widthPortion = BI.Arrangement.PORTION;
}
if (leftPortion + widthPortion > BI.Arrangement.PORTION) {
leftPortion = BI.Arrangement.PORTION - widthPortion;
}
// if (leftPortion > BI.Arrangement.PORTION) {
// leftPortion = BI.Arrangement.PORTION;
// }
// if (widthPortion > BI.Arrangement.PORTION) {
// widthPortion = BI.Arrangement.PORTION;
// }
// if (leftPortion + widthPortion > BI.Arrangement.PORTION) {
// leftPortion = BI.Arrangement.PORTION - widthPortion;
// }
if (widthPortion === 0) {
widthPortion = 1;
}
@ -1735,7 +1735,6 @@ BI.Arrangement = BI.inherit(BI.Widget, {
resize: function () {
var self = this, o = this.options;
var occupied = this._applyContainer();
switch (o.layoutType) {
case BI.Arrangement.LAYOUT_TYPE.FREE:
break;
@ -1828,7 +1827,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
});
BI.Arrangement.EVENT_SCROLL = "EVENT_SCROLL";
BI.extend(BI.Arrangement, {
PORTION: 32,
PORTION: 36,
H_PORTION: 18,
LAYOUT_TYPE: {
GRID: 0,

4
src/widget/adaptivearrangement/adaptivearrangement.js

@ -39,9 +39,9 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
self._initResizable(item.el);
});
this.element.mousedown(function (e) {
$(document).mousedown(function (e) {
BI.each(self.getAllRegions(), function (i, region) {
if (!region.el.element.__isMouseInBounds__(e)) {
if (region.el.element.find(e.target).length === 0) {
region.el.element.removeClass("selected");
}
});

21
src/widget/arrangement/arrangement.js

@ -366,15 +366,15 @@ BI.Arrangement = BI.inherit(BI.Widget, {
var leftPortion = Math.round(position.left / perWidth);
var topPortion = Math.round(position.top / perHeight);
var heightPortion = Math.round(position.height / perHeight);
if (leftPortion > BI.Arrangement.PORTION) {
leftPortion = BI.Arrangement.PORTION;
}
if (widthPortion > BI.Arrangement.PORTION) {
widthPortion = BI.Arrangement.PORTION;
}
if (leftPortion + widthPortion > BI.Arrangement.PORTION) {
leftPortion = BI.Arrangement.PORTION - widthPortion;
}
// if (leftPortion > BI.Arrangement.PORTION) {
// leftPortion = BI.Arrangement.PORTION;
// }
// if (widthPortion > BI.Arrangement.PORTION) {
// widthPortion = BI.Arrangement.PORTION;
// }
// if (leftPortion + widthPortion > BI.Arrangement.PORTION) {
// leftPortion = BI.Arrangement.PORTION - widthPortion;
// }
if (widthPortion === 0) {
widthPortion = 1;
}
@ -941,7 +941,6 @@ BI.Arrangement = BI.inherit(BI.Widget, {
resize: function () {
var self = this, o = this.options;
var occupied = this._applyContainer();
switch (o.layoutType) {
case BI.Arrangement.LAYOUT_TYPE.FREE:
break;
@ -1034,7 +1033,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
});
BI.Arrangement.EVENT_SCROLL = "EVENT_SCROLL";
BI.extend(BI.Arrangement, {
PORTION: 32,
PORTION: 36,
H_PORTION: 18,
LAYOUT_TYPE: {
GRID: 0,

Loading…
Cancel
Save