guy 8 years ago
parent
commit
26b3daab12
  1. 23
      bi/widget.js
  2. 23
      docs/widget.js
  3. 8
      src/widget/adaptivearrangement/adaptivearrangement.js
  4. 11
      src/widget/arrangement/arrangement.js
  5. 4
      src/widget/interactivearrangement/interactivearrangement.js

23
bi/widget.js

@ -475,8 +475,8 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
width: ui.size.width,
height: height
});
self.arrangement.scrollTo(height);
}, 500);
self.arrangement.scrollTo({top: height});
}, 300);
};
this.arrangement.container.element.resizable({
handles: "s",
@ -879,6 +879,10 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
return this.arrangement.setRegionPosition(name, position);
},
scrollTo: function (scroll) {
this.arrangement.scrollTo(scroll);
},
zoom: function (ratio) {
this.arrangement.zoom(ratio);
},
@ -1205,7 +1209,8 @@ BI.Arrangement = BI.inherit(BI.Widget, {
findBottomRegions.push(region);
}
});
var topValid = isRegionsValid(findTopRegions, "top"), bottomValid = isRegionsValid(findBottomRegions, "bottom");
var topValid = isRegionsValid(findTopRegions, "top"),
bottomValid = isRegionsValid(findBottomRegions, "bottom");
if (topValid && bottomValid) {
BI.each(findTopRegions, function (i, region) {
var clone = BI.clone(region);
@ -1248,7 +1253,8 @@ BI.Arrangement = BI.inherit(BI.Widget, {
findRightRegions.push(region);
}
});
var leftValid = isRegionsValid(findLeftRegions, "left"), rightValid = isRegionsValid(findRightRegions, "right");
var leftValid = isRegionsValid(findLeftRegions, "left"),
rightValid = isRegionsValid(findRightRegions, "right");
if (leftValid && rightValid) {
BI.each(findLeftRegions, function (i, region) {
var clone = BI.clone(region);
@ -3679,8 +3685,9 @@ BI.Arrangement = BI.inherit(BI.Widget, {
this.resize();
},
scrollTo: function (top) {
this.scrollContainer.element.scrollTop(top);
scrollTo: function (scroll) {
this.scrollContainer.element.scrollTop(scroll.top);
this.scrollContainer.element.scrollLeft(scroll.left);
},
zoom: function (ratio) {
@ -7682,6 +7689,10 @@ BI.InteractiveArrangement = BI.inherit(BI.Widget, {
return this.arrangement.setRegionPosition(name, position);
},
scrollTo: function (scroll) {
this.arrangement.scrollTo(scroll);
},
zoom: function (ratio) {
this.arrangement.zoom(ratio);
},

23
docs/widget.js

@ -475,8 +475,8 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
width: ui.size.width,
height: height
});
self.arrangement.scrollTo(height);
}, 500);
self.arrangement.scrollTo({top: height});
}, 300);
};
this.arrangement.container.element.resizable({
handles: "s",
@ -879,6 +879,10 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
return this.arrangement.setRegionPosition(name, position);
},
scrollTo: function (scroll) {
this.arrangement.scrollTo(scroll);
},
zoom: function (ratio) {
this.arrangement.zoom(ratio);
},
@ -1205,7 +1209,8 @@ BI.Arrangement = BI.inherit(BI.Widget, {
findBottomRegions.push(region);
}
});
var topValid = isRegionsValid(findTopRegions, "top"), bottomValid = isRegionsValid(findBottomRegions, "bottom");
var topValid = isRegionsValid(findTopRegions, "top"),
bottomValid = isRegionsValid(findBottomRegions, "bottom");
if (topValid && bottomValid) {
BI.each(findTopRegions, function (i, region) {
var clone = BI.clone(region);
@ -1248,7 +1253,8 @@ BI.Arrangement = BI.inherit(BI.Widget, {
findRightRegions.push(region);
}
});
var leftValid = isRegionsValid(findLeftRegions, "left"), rightValid = isRegionsValid(findRightRegions, "right");
var leftValid = isRegionsValid(findLeftRegions, "left"),
rightValid = isRegionsValid(findRightRegions, "right");
if (leftValid && rightValid) {
BI.each(findLeftRegions, function (i, region) {
var clone = BI.clone(region);
@ -3679,8 +3685,9 @@ BI.Arrangement = BI.inherit(BI.Widget, {
this.resize();
},
scrollTo: function (top) {
this.scrollContainer.element.scrollTop(top);
scrollTo: function (scroll) {
this.scrollContainer.element.scrollTop(scroll.top);
this.scrollContainer.element.scrollLeft(scroll.left);
},
zoom: function (ratio) {
@ -7682,6 +7689,10 @@ BI.InteractiveArrangement = BI.inherit(BI.Widget, {
return this.arrangement.setRegionPosition(name, position);
},
scrollTo: function (scroll) {
this.arrangement.scrollTo(scroll);
},
zoom: function (ratio) {
this.arrangement.zoom(ratio);
},

8
src/widget/adaptivearrangement/adaptivearrangement.js

@ -56,8 +56,8 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
width: ui.size.width,
height: height
});
self.arrangement.scrollTo(height);
}, 500);
self.arrangement.scrollTo({top: height});
}, 300);
};
this.arrangement.container.element.resizable({
handles: "s",
@ -460,6 +460,10 @@ BI.AdaptiveArrangement = BI.inherit(BI.Widget, {
return this.arrangement.setRegionPosition(name, position);
},
scrollTo: function (scroll) {
this.arrangement.scrollTo(scroll);
},
zoom: function (ratio) {
this.arrangement.zoom(ratio);
},

11
src/widget/arrangement/arrangement.js

@ -214,7 +214,8 @@ BI.Arrangement = BI.inherit(BI.Widget, {
findBottomRegions.push(region);
}
});
var topValid = isRegionsValid(findTopRegions, "top"), bottomValid = isRegionsValid(findBottomRegions, "bottom");
var topValid = isRegionsValid(findTopRegions, "top"),
bottomValid = isRegionsValid(findBottomRegions, "bottom");
if (topValid && bottomValid) {
BI.each(findTopRegions, function (i, region) {
var clone = BI.clone(region);
@ -257,7 +258,8 @@ BI.Arrangement = BI.inherit(BI.Widget, {
findRightRegions.push(region);
}
});
var leftValid = isRegionsValid(findLeftRegions, "left"), rightValid = isRegionsValid(findRightRegions, "right");
var leftValid = isRegionsValid(findLeftRegions, "left"),
rightValid = isRegionsValid(findRightRegions, "right");
if (leftValid && rightValid) {
BI.each(findLeftRegions, function (i, region) {
var clone = BI.clone(region);
@ -2688,8 +2690,9 @@ BI.Arrangement = BI.inherit(BI.Widget, {
this.resize();
},
scrollTo: function (top) {
this.scrollContainer.element.scrollTop(top);
scrollTo: function (scroll) {
this.scrollContainer.element.scrollTop(scroll.top);
this.scrollContainer.element.scrollLeft(scroll.left);
},
zoom: function (ratio) {

4
src/widget/interactivearrangement/interactivearrangement.js

@ -525,6 +525,10 @@ BI.InteractiveArrangement = BI.inherit(BI.Widget, {
return this.arrangement.setRegionPosition(name, position);
},
scrollTo: function (scroll) {
this.arrangement.scrollTo(scroll);
},
zoom: function (ratio) {
this.arrangement.zoom(ratio);
},

Loading…
Cancel
Save