Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
In order to have flexibility in where we place panels, we need to make
Browse files Browse the repository at this point in the history
the main content wrap have a 3dtransform class
  • Loading branch information
jefflembeck committed Jan 7, 2013
1 parent da342b1 commit 1a1e88f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions css/structure/jquery.mobile.panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@
}

/* dismiss and content wrap open positions */
.ui-panel-content-wrap-open.ui-panel-content-wrap-display-reveal,
.ui-panel-content-wrap-open.ui-panel-content-wrap-display-reveal,
.ui-panel-dismiss-open.ui-panel-dismiss-display-reveal,
.ui-panel-content-wrap-open.ui-panel-content-wrap-display-push,
.ui-panel-content-wrap-open.ui-panel-content-wrap-display-push,
.ui-panel-dismiss-open.ui-panel-dismiss-display-push,
.ui-panel-dismiss-open.ui-panel-dismiss-display-overlay {
left: 17em;
}
.ui-panel-3dtransforms ~.ui-panel-content-wrap-open.ui-panel-content-wrap-display-reveal,
.ui-panel-3dtransforms ~.ui-panel-content-wrap-open.ui-panel-content-wrap-display-push {
.ui-panel-3dtransforms.ui-panel-content-wrap-open.ui-panel-content-wrap-display-reveal,
.ui-panel-3dtransforms.ui-panel-content-wrap-open.ui-panel-content-wrap-display-push {
-webkit-transform: translateX(17em);
-moz-transform: translateX(17em);
-ms-transform: translateX(17em);
Expand Down Expand Up @@ -209,4 +209,4 @@
.ui-responsive-panel .ui-panel-dismiss-display-push {
display: none;
}
}
}
4 changes: 4 additions & 0 deletions js/widgets/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ $.widget( "mobile.panel", $.mobile.widget, {
var $wrapper = self._page.find( "." + self.options.classes.contentWrap );
if( $wrapper.length === 0 ){
$wrapper = self._page.find( ".ui-header, .ui-content, .ui-footer" ).wrapAll( '<div class="' + self.options.classes.contentWrap + '" />' ).parent();
if( $.support.cssTransform3d && !!self.options.positionFixed ) {
$wrapper.addClass( self.options.classes.cssTransform3d );
}
}
return $wrapper;
};
Expand Down Expand Up @@ -216,6 +219,7 @@ $.widget( "mobile.panel", $.mobile.widget, {
self._positionPanel();
self._bindFixListener();
self._trigger( "open" );
console.log( "fired" );
};

if( this.element.closest( ".ui-page-active" ).length < 0 ){
Expand Down

0 comments on commit 1a1e88f

Please sign in to comment.