fixes for resizebars
This commit is contained in:
parent
ea8f08e884
commit
624c1cd105
1 changed files with 10 additions and 6 deletions
|
@ -1240,6 +1240,8 @@ requires
|
||||||
|
|
||||||
$.extend(self, {
|
$.extend(self, {
|
||||||
clientXY: self.options.orientation == "horizontal" ? "clientY" : "clientX",
|
clientXY: self.options.orientation == "horizontal" ? "clientY" : "clientX",
|
||||||
|
dimensions: oxui.getDimensions(self.options.orientation), // fixme: should orientation be the opposite orientation here?
|
||||||
|
edges: oxui.getEdges(self.options.orientation),
|
||||||
ids: $.map(self.options.elements, function(v, i) {
|
ids: $.map(self.options.elements, function(v, i) {
|
||||||
return v.options("id");
|
return v.options("id");
|
||||||
}),
|
}),
|
||||||
|
@ -1258,11 +1260,11 @@ requires
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
that.css("left", self.options.size + "px");
|
that.css(self.edges[2], self.options.size + "px");
|
||||||
self.options.elements[0].css("width", self.options.size + "px");
|
self.options.elements[0].css(self.dimensions[1], self.options.size + "px");
|
||||||
self.options.elements[1].css("left", (self.options.size + 1) + "px");
|
self.options.elements[1].css(self.edges[2], (self.options.size + 1) + "px");
|
||||||
Ox.Event.trigger("resize_" + self.ids[0], self.options.size);
|
Ox.Event.trigger("resize_" + self.ids[0], self.options.size);
|
||||||
Ox.Event.trigger("resize_" + self.ids[1], self.options.elements[1].width());
|
Ox.Event.trigger("resize_" + self.ids[1], self.options.elements[1][self.dimensions[1]]());
|
||||||
}
|
}
|
||||||
|
|
||||||
function dragStart(e) {
|
function dragStart(e) {
|
||||||
|
@ -1282,10 +1284,11 @@ requires
|
||||||
Ox.print("toggle");
|
Ox.print("toggle");
|
||||||
var size = self.options.collapsed ? 0 : -self.options.size,
|
var size = self.options.collapsed ? 0 : -self.options.size,
|
||||||
animate = {};
|
animate = {};
|
||||||
|
Ox.print("s.o.e", self.options.edge);
|
||||||
animate[self.options.edge] = size;
|
animate[self.options.edge] = size;
|
||||||
self.options.parent.animate(animate, 200, function() {
|
self.options.parent.animate(animate, 200, function() {
|
||||||
var i = (self.options.edge == "left" || self.options.edge == "top") ? 1 : 0;
|
var i = (self.options.edge == "left" || self.options.edge == "top") ? 1 : 0;
|
||||||
Ox.Event.trigger("resize_" + self.ids[i], self.options.elements[i].width());
|
Ox.Event.trigger("resize_" + self.ids[i], self.options.elements[i][self.dimensions[1]]());
|
||||||
self.options.collapsed = !self.options.collapsed;
|
self.options.collapsed = !self.options.collapsed;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -4641,7 +4644,8 @@ requires
|
||||||
Ox.print("v.size", v.size)
|
Ox.print("v.size", v.size)
|
||||||
$resizebar = new Ox.Resizebar({
|
$resizebar = new Ox.Resizebar({
|
||||||
collapsible: v.collapsible,
|
collapsible: v.collapsible,
|
||||||
edge: i == 0 ? "left" : "right",
|
edge: self.options.orientation == "horizontal" ?
|
||||||
|
(i == 0 ? "left" : "right") : (i == 0 ? "top" : "bottom"),
|
||||||
elements: i < 2 ?
|
elements: i < 2 ?
|
||||||
[that.$elements[0], that.$elements[1]] :
|
[that.$elements[0], that.$elements[1]] :
|
||||||
[that.$elements[1], that.$elements[2]],
|
[that.$elements[1], that.$elements[2]],
|
||||||
|
|
Loading…
Reference in a new issue