Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ENYO-728: finish drawer open animation by clearing manual setting of …

…height

Add nested drawer to sampler drawer sample to test out this bug

Enyo-DCO-1.0-Signed-off-by: Ben Combee <ben.combee@palm.com>
  • Loading branch information...
commit d5bbcd26da42060d258bfd2c2376e9de7e6abd91 1 parent 42a5711
@unwiredben unwiredben authored
Showing with 17 additions and 1 deletion.
  1. +9 −1 samples/DrawerSample.js
  2. +8 −0 source/Drawer.js
View
10 samples/DrawerSample.js
@@ -5,13 +5,18 @@ enyo.kind({
{content: "Drawers", classes:"drawer-sample-divider"},
{content: "Activate (V)", classes: "drawer-sample-box drawer-sample-mtb", ontap:"activateDrawer"},
{name: "drawer", kind: "onyx.Drawer", components: [
+ {content: "Vertical Drawer<br>Vertical Drawer<br>Vertical Drawer<br>Vertical Drawer", allowHtml: true, classes: "drawer-sample-box drawer-sample-mtb"},
+ {content: "Activate (V)", classes: "drawer-sample-box drawer-sample-mtb", ontap:"activateDrawer2"},
+ {name: "drawer2", kind: "onyx.Drawer", components: [
+ {content: "Vertical Drawer<br>Vertical Drawer<br>Vertical Drawer<br>Vertical Drawer", allowHtml: true, classes: "drawer-sample-box drawer-sample-mtb"}
+ ]},
{content: "Vertical Drawer<br>Vertical Drawer<br>Vertical Drawer<br>Vertical Drawer", allowHtml: true, classes: "drawer-sample-box drawer-sample-mtb"}
]},
{content: "Foo<br>Foo", allowHtml: true, classes: "drawer-sample-box drawer-sample-mtb"},
{kind: "FittableColumns", fit: true, ontap: "activateColumnsDrawer", classes: "drawer-sample-box drawer-sample-mtb drawer-sample-o", components: [
{content: "Activate (H)", classes: "drawer-sample-box drawer-sample-mlr"},
{name: "columnsDrawer", orient: "h", kind: "onyx.Drawer", open: false, components: [
- {content: "H-Drawer", classes: "drawer-sample-box drawer-sample-mlr"},
+ {content: "H-Drawer", classes: "drawer-sample-box drawer-sample-mlr"}
]},
{content: "Foo", fit: true, classes: "drawer-sample-box drawer-sample-mlr drawer-sample-o"},
{content: "Foo", classes: "drawer-sample-box drawer-sample-mlr"}
@@ -21,6 +26,9 @@ enyo.kind({
activateDrawer: function() {
this.$.drawer.setOpen(!this.$.drawer.open);
},
+ activateDrawer2: function() {
+ this.$.drawer2.setOpen(!this.$.drawer2.open);
+ },
activateColumnsDrawer: function() {
this.$.columnsDrawer.setOpen(!this.$.columnsDrawer.open);
return true;
View
8 source/Drawer.js
@@ -68,6 +68,14 @@ enyo.kind({
if (!this.open) {
this.$.client.hide();
}
+ else {
+ // at end of open animation, clean limit on height/width
+ var p = (this.orient == "v") ? "height" : "width";
+ var cn = this.hasNode();
+ if (cn) {
+ cn.style[p] = this.$.client.domStyles[p] = null;
+ }
+ }
if (this.container) {
this.container.resized();
}
Please sign in to comment.
Something went wrong with that request. Please try again.