Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(dialog, menu, select, interimElement): use $animateCss instead of…
Browse files Browse the repository at this point in the history
… transitionEnd events.

replace programmatic use of element.css for style changes and use of transitionEnd event listeners with use of ngAnimate's $animateCss; use polyfill for Angular <1.4.

$mdUtil.dom.animator.translate3d() uses $animateCss() instead of waitTransitionEnd()
use animateCss.js polyfill for 'material.animate' module
- add mock `createMockStyleSheet` for animateCss tests
refactors to menu-interim-element.js and select.js
- refactor logic and patterns used
- use $animateCss in place of waitTransitionEnd()
debounce Select and Menu window resize handlers
Dialog uses same showBackdrop/hideBackdrop pattern as Menu and Select
select async demo no longer clears users list when reloading
select demos use `md-input-container { margin-right: 10px;}`
hide Select Backdrop with zero duration
enable full click detection in select-value area by using background color (with zero alpa).

BREAKING-CHANGES:  select and backdrop styles added

*  select list text is not selectable,
*  select backdrop hide duration is 0ms
*  select text value background has zero alpha

```scss
.md-text {  @include not-selectable(); }

.md-select-value {
  background-color: rgba(0,0,0,0);
}

md-backdrop {
  &.md-select-backdrop {
      transition-duration: 0ms;
  }
}
```

Fixes #3919. Fixes #3837. Fixes #3773, Fixes #3640. Fixes #3527. Fixes #3653.
  • Loading branch information
ThomasBurleson authored and Robert Messerle committed Jul 29, 2015
1 parent c63e859 commit 29cf32b
Show file tree
Hide file tree
Showing 19 changed files with 1,756 additions and 625 deletions.
1 change: 1 addition & 0 deletions src/components/backdrop/backdrop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ md-backdrop {
}
&.md-select-backdrop {
z-index: $z-index-dialog + 1;
transition-duration: 0ms;
}
&.md-dialog-backdrop {
z-index: $z-index-dialog - 1;
Expand Down
10 changes: 6 additions & 4 deletions src/components/dialog/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,6 @@ function MdDialogProvider($$interimElementProvider) {
// In case the user provides a raw dom element, always wrap it in jqLite
options.parent = angular.element(options.parent || $rootElement);

if (options.disableParentScroll) {
options.restoreScroll = $mdUtil.disableScrollAround(element,options.parent);
}
}

/**
Expand Down Expand Up @@ -610,6 +607,10 @@ function MdDialogProvider($$interimElementProvider) {
$animate.enter(options.backdrop, options.parent);
}

if (options.disableParentScroll) {
options.restoreScroll = $mdUtil.disableScrollAround(element,options.parent);
}

/**
* Hide modal backdrop element...
*/
Expand All @@ -619,9 +620,10 @@ function MdDialogProvider($$interimElementProvider) {
}
if (options.disableParentScroll) {
options.restoreScroll();
delete options.restoreScroll;
}

options.hideBackdrop = null;
delete options.hideBackdrop;
}
}

Expand Down
Loading

0 comments on commit 29cf32b

Please sign in to comment.