@@ -67,6 +67,8 @@ function MdSwitch(mdCheckboxDirective, $mdTheming, $mdUtil, $document, $mdConsta
6767
6868 function compile ( element , attr ) {
6969 var checkboxLink = checkboxDirective . compile ( element , attr ) ;
70+ // no transition on initial load
71+ element . addClass ( 'md-dragging' ) ;
7072
7173 return function ( scope , element , attr , ngModel ) {
7274 ngModel = ngModel || $mdUtil . fakeNgModel ( ) ;
@@ -76,7 +78,7 @@ function MdSwitch(mdCheckboxDirective, $mdTheming, $mdUtil, $document, $mdConsta
7678
7779 // no transition on initial load
7880 $$rAF ( function ( ) {
79- element . addClass ( 'transition ') ;
81+ element . removeClass ( 'md-dragging ') ;
8082 } ) ;
8183
8284 // Tell the checkbox we don't want a click listener.
@@ -96,7 +98,7 @@ function MdSwitch(mdCheckboxDirective, $mdTheming, $mdUtil, $document, $mdConsta
9698 if ( disabledGetter ( scope ) ) return ev . preventDefault ( ) ;
9799
98100 drag . width = thumbContainer . prop ( 'offsetWidth' ) ;
99- element . removeClass ( 'transition ') ;
101+ element . addClass ( 'md-dragging ') ;
100102 }
101103 function onDrag ( ev , drag ) {
102104 var percent = drag . distance / drag . width ;
@@ -112,7 +114,7 @@ function MdSwitch(mdCheckboxDirective, $mdTheming, $mdUtil, $document, $mdConsta
112114 function onDragEnd ( ev , drag ) {
113115 if ( disabledGetter ( scope ) ) return false ;
114116
115- element . addClass ( 'transition ') ;
117+ element . removeClass ( 'md-dragging ') ;
116118 thumbContainer . css ( $mdConstant . CSS . TRANSFORM , '' ) ;
117119
118120 // We changed if there is no distance (this is a click a click),
0 commit comments