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 19, 2016
1 parent bde02cd commit 16650c0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 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.7",
"version": "0.4.8",
"description": "Material Design Expansion Panels.",
"main": [
"dist/md-expansion-panel.js",
Expand Down
15 changes: 13 additions & 2 deletions dist/md-expansion-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ function expansionPanelDirective() {
function getTransformParent(el) {
var parent = el.parentNode;

while (parent) {
if ($mdUtil.hasComputedStyle(angular.element(parent), 'transform')) {
while (parent && parent !== document) {
if (hasComputedStyle(parent, 'transform')) {
return parent;
}
parent = parent.parentNode;
Expand All @@ -347,6 +347,17 @@ function expansionPanelDirective() {
return undefined;
}

function hasComputedStyle(target, key) {
var hasValue = false;

if (target) {
var computedStyles = $window.getComputedStyle(target);
hasValue = computedStyles[key] !== undefined && computedStyles[key] !== 'none';
}

return hasValue;
}


function updateScroll(e) {
var top;
Expand Down
Loading

0 comments on commit 16650c0

Please sign in to comment.