57
57
*/
58
58
59
59
MdKeyboardProvider . $inject = [ "$$interimElementProvider" , "$injector" , "keyboardLayouts" , "keyboardDeadkey" , "keyboardSymbols" , "keyboardNumpad" ] ;
60
- MdKeyboardDirective . $inject = [ "$mdKeyboard" , "$mdTheming" ] ;
61
- useKeyboardDirective . $inject = [ "$mdKeyboard" , "$injector" , "$ timeout", "$animate" , "$rootScope" ] ;
60
+ MdKeyboardDirective . $inject = [ "$mdKeyboard" ] ;
61
+ useKeyboardDirective . $inject = [ "$mdKeyboard" , "$timeout" , "$animate" , "$rootScope" ] ;
62
62
angular
63
63
. module ( 'material.components.keyboard' , [
64
64
'material.core' ,
@@ -1209,7 +1209,7 @@ function MdKeyboardProvider($$interimElementProvider, $injector, keyboardLayouts
1209
1209
1210
1210
// get currently used layout object
1211
1211
function getCurrentLayout ( ) {
1212
- return LAYOUTS [ CURRENT_LAYOUT ] ;
1212
+ return CURRENT_LAYOUT ;
1213
1213
}
1214
1214
1215
1215
// get currently used layout object
@@ -1419,11 +1419,10 @@ angular
1419
1419
. directive ( 'mdKeyboard' , MdKeyboardDirective )
1420
1420
. directive ( 'useKeyboard' , useKeyboardDirective ) ;
1421
1421
1422
- function MdKeyboardDirective ( $mdKeyboard , $mdTheming ) {
1422
+ function MdKeyboardDirective ( $mdKeyboard ) {
1423
1423
return {
1424
1424
restrict : 'E' ,
1425
- link : function postLink ( scope , element , attr ) {
1426
- $mdTheming ( element ) ;
1425
+ link : function postLink ( scope ) {
1427
1426
// When navigation force destroys an interimElement, then
1428
1427
// listen and $destroy() that interim instance...
1429
1428
scope . $on ( '$destroy' , function ( ) {
@@ -1433,7 +1432,7 @@ function MdKeyboardDirective($mdKeyboard, $mdTheming) {
1433
1432
} ;
1434
1433
}
1435
1434
1436
- function useKeyboardDirective ( $mdKeyboard , $injector , $ timeout, $animate , $rootScope ) {
1435
+ function useKeyboardDirective ( $mdKeyboard , $timeout , $animate , $rootScope ) {
1437
1436
return {
1438
1437
restrict : 'A' ,
1439
1438
require : '?ngModel' ,
@@ -1603,17 +1602,6 @@ function useKeyboardDirective($mdKeyboard, $injector, $timeout, $animate, $rootS
1603
1602
break ;
1604
1603
1605
1604
default :
1606
-
1607
- //$timeout(function () {
1608
- //var event = new window.KeyboardEvent('keypress', {
1609
- // bubbles: true,
1610
- // cancelable: true,
1611
- // shiftKey: true,
1612
- // keyCode: key.charCodeAt(0)
1613
- //});
1614
- // element[0].dispatchEvent(event);
1615
- //});
1616
-
1617
1605
$mdKeyboard . currentModel . $setViewValue ( ( $mdKeyboard . currentModel . $viewValue || '' ) + key [ 0 ] ) ;
1618
1606
$mdKeyboard . currentModel . $validate ( ) ;
1619
1607
$mdKeyboard . currentModel . $render ( ) ;
0 commit comments