-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(dialog, menu, select, interimElement): use $animateCss instead of transitionEnd events. #3949
Conversation
@jelbourn @robertmesserle @matsko @rschmukler - For your review. This code works great at runtime with Angular 1.3.15 and Angular 1.4.3. @matsko - Unfortunately the Karma tests fail when testing with Angular 1.3.15, so we are unable to merge until this is resolved. |
Ok I will figure this out tonight
|
@@ -3,7 +3,7 @@ var fs = require('fs'); | |||
var versionFile = __dirname + '/../dist/commit'; | |||
|
|||
module.exports = { | |||
ngVersion: '1.4.3', | |||
ngVersion: '1.3.15', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not be merged; it is, however, useful for testing the Karma failures with Angular 1.3.x
@matsko - to be clear:
|
$rootScope.$apply(); | ||
$$rAF.flush(); | ||
} finally { | ||
$timeout.flush(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check if this finally
is still needed.
@@ -5,6 +5,7 @@ md-backdrop { | |||
} | |||
&.md-select-backdrop { | |||
z-index: $z-index-dialog + 1; | |||
transition-duration: 0ms; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just 0
$animateCss(element, { | ||
addClass : 'md-active', | ||
from : animator.toCss( position ), | ||
to : animator.toCss( { transform : 'scale(1.0,1.0)' }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra spaces from inside object literal (here and elsewhere). E.g.,
animator.toCss({transform: 'scale(1.0,1.0)'})
@jelbourn - All (99%) your comments have been addressed. |
ba2626d
to
cd52e57
Compare
@matsko - great work with $animateCss |
9cbaffb
to
e93b6b8
Compare
… 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 * disable scroll before creating the backdrop * 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). * update use of $$rAF and $timeout in Jasmine tests * use $animateCss to animate the dropdown leave. * Jasmine tests disable animation transitions for Toast and Select 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.
… 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 * disable scroll before creating the backdrop * 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). * update use of $$rAF and $timeout in Jasmine tests * use $animateCss to animate the dropdown leave. * Jasmine tests disable animation transitions for Toast and Select 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 angular#3919. Fixes angular#3837. Fixes angular#3773, Fixes angular#3640. Fixes angular#3527. Fixes angular#3653. Closes angular#3949.
Replace programmatic use of element.css for style changes and use of transitionEnd event listeners with use of ngAnimate's $animateCss; use $animateCss polyfill for Angular versions < 1.4.x
createMockStyleSheet
for animateCss testsmd-input-container { margin-right: 10px;}
BREAKING-CHANGES: select and backdrop styles added
Fixes #3919. Fixes #3837. Fixes #3773, Fixes #3640. Fixes #3527. Fixes #3653.