Skip to content

Commit 97d62d8

Browse files
Ben RubinBen Rubin
authored andcommitted
new version
1 parent 7e3642e commit 97d62d8

File tree

6 files changed

+16
-10
lines changed

6 files changed

+16
-10
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-material-expansion-panel",
3-
"version": "0.4.5",
3+
"version": "0.4.6",
44
"description": "Material Design Expansion Panels.",
55
"main": [
66
"dist/md-expansion-panel.js",

dist/md-expansion-panel.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ md-expansion-panel-header {
129129
line-height: 48px;
130130
padding: 0 24px;
131131
box-sizing: border-box;
132-
border-bottom: 1px solid; }
132+
border-bottom: 1px solid;
133+
-webkit-box-align: center;
134+
-ms-flex-align: center;
135+
align-items: center; }
133136
md-expansion-panel-header.md-stick .md-expansion-panel-header-container {
134137
position: fixed;
135138
z-index: 2;

dist/md-expansion-panel.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ function expansionPanelDirective() {
297297
// listen to window scroll events
298298
angular.element($window)
299299
.on('scroll', debouncedUpdateScroll)
300-
.on('resize', debouncedUpdateScroll);
300+
.on('resize', debouncedUpdateScroll)
301+
.on('resize', debouncedUpdateResize);
301302
}
302303

303304

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

323324
angular.element($window)
324325
.off('scroll', debouncedUpdateScroll)
325-
.off('resize', debouncedUpdateScroll);
326+
.off('resize', debouncedUpdateScroll)
327+
.off('resize', debouncedUpdateResize);
326328
}
327329

328330

@@ -361,7 +363,8 @@ function expansionPanelDirective() {
361363
}
362364

363365

364-
function updateResize(value) {
366+
function updateResize() {
367+
var value = $element[0].offsetWidth;
365368
if (footerCtrl && footerCtrl.noSticky === false) { footerCtrl.onResize(value); }
366369
if (headerCtrl && headerCtrl.noSticky === false) { headerCtrl.onResize(value); }
367370
}
@@ -1108,7 +1111,7 @@ function expansionPanelHeaderDirective() {
11081111
if (panelbottom < 0) {
11091112
offset += panelbottom;
11101113
}
1111-
1114+
11121115
// set container width because element becomes postion fixed
11131116
container.css('width', element[0].offsetWidth + 'px');
11141117
container.css('top', offset + 'px');
@@ -1126,7 +1129,7 @@ function expansionPanelHeaderDirective() {
11261129

11271130
function onResize(width) {
11281131
if (isStuck === false) { return; }
1129-
element.css('width', width + 'px');
1132+
container.css('width', width + 'px');
11301133
}
11311134

11321135

dist/md-expansion-panel.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)