Skip to content

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Rubin authored and Ben Rubin committed Jul 15, 2016
1 parent 7e3642e commit 97d62d8
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-material-expansion-panel",
"version": "0.4.5",
"version": "0.4.6",
"description": "Material Design Expansion Panels.",
"main": [
"dist/md-expansion-panel.js",
Expand Down
5 changes: 4 additions & 1 deletion dist/md-expansion-panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ md-expansion-panel-header {
line-height: 48px;
padding: 0 24px;
box-sizing: border-box;
border-bottom: 1px solid; }
border-bottom: 1px solid;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center; }
md-expansion-panel-header.md-stick .md-expansion-panel-header-container {
position: fixed;
z-index: 2;
Expand Down
13 changes: 8 additions & 5 deletions dist/md-expansion-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ function expansionPanelDirective() {
// listen to window scroll events
angular.element($window)
.on('scroll', debouncedUpdateScroll)
.on('resize', debouncedUpdateScroll);
.on('resize', debouncedUpdateScroll)
.on('resize', debouncedUpdateResize);
}


Expand All @@ -322,7 +323,8 @@ function expansionPanelDirective() {

angular.element($window)
.off('scroll', debouncedUpdateScroll)
.off('resize', debouncedUpdateScroll);
.off('resize', debouncedUpdateScroll)
.off('resize', debouncedUpdateResize);
}


Expand Down Expand Up @@ -361,7 +363,8 @@ function expansionPanelDirective() {
}


function updateResize(value) {
function updateResize() {
var value = $element[0].offsetWidth;
if (footerCtrl && footerCtrl.noSticky === false) { footerCtrl.onResize(value); }
if (headerCtrl && headerCtrl.noSticky === false) { headerCtrl.onResize(value); }
}
Expand Down Expand Up @@ -1108,7 +1111,7 @@ function expansionPanelHeaderDirective() {
if (panelbottom < 0) {
offset += panelbottom;
}

// set container width because element becomes postion fixed
container.css('width', element[0].offsetWidth + 'px');
container.css('top', offset + 'px');
Expand All @@ -1126,7 +1129,7 @@ function expansionPanelHeaderDirective() {

function onResize(width) {
if (isStuck === false) { return; }
element.css('width', width + 'px');
container.css('width', width + 'px');
}


Expand Down
2 changes: 1 addition & 1 deletion dist/md-expansion-panel.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 97d62d8

Please sign in to comment.