diff --git a/src/controllers/creator.coffee b/src/controllers/creator.coffee index 2a37dcc..525b06f 100644 --- a/src/controllers/creator.coffee +++ b/src/controllers/creator.coffee @@ -174,6 +174,4 @@ angular.module 'matching', ['ngAnimate'] assets: [questionMediaId, answerMediaId, answerAudioId] Materia.CreatorCore.start materiaCallbacks -] - -angular.bootstrap(document, ['matching']) \ No newline at end of file +] \ No newline at end of file diff --git a/src/controllers/player.coffee b/src/controllers/player.coffee index 408482e..1ed5c71 100644 --- a/src/controllers/player.coffee +++ b/src/controllers/player.coffee @@ -512,5 +512,3 @@ angular.module 'matching' Materia.Engine.start materiaCallbacks ] - -angular.bootstrap(document, ['matching']) \ No newline at end of file diff --git a/src/directives/audioControls.coffee b/src/directives/audioControls.coffee index 03f319e..2fddcf5 100644 --- a/src/directives/audioControls.coffee +++ b/src/directives/audioControls.coffee @@ -1,6 +1,6 @@ -Matching = angular.module 'matching' +angular.module 'matching' -Matching.directive 'ngAudioControls', -> +.directive 'ngAudioControls', -> restrict: 'EA' scope: audioSource: '@audioSource' @@ -42,4 +42,5 @@ Matching.directive 'ngAudioControls', -> unless $scope.selectingNewTime $scope.currentTime = $scope.audio.currentTime $scope.$apply() - ] \ No newline at end of file + ] +angular.bootstrap(document, ['matching']) \ No newline at end of file diff --git a/src/directives/focusMe.coffee b/src/directives/focusMe.coffee index 041776d..adfc229 100644 --- a/src/directives/focusMe.coffee +++ b/src/directives/focusMe.coffee @@ -1,6 +1,6 @@ -Matching = angular.module 'matching' +angular.module 'matching' -Matching.directive 'focusMe', ['$timeout', '$parse', ($timeout, $parse) -> +.directive 'focusMe', ['$timeout', '$parse', ($timeout, $parse) -> link: (scope, element, attrs) -> model = $parse(attrs.focusMe) scope.$watch model, (value) -> diff --git a/src/directives/inputStateManager.coffee b/src/directives/inputStateManager.coffee index f8eabc7..4bdb5ce 100644 --- a/src/directives/inputStateManager.coffee +++ b/src/directives/inputStateManager.coffee @@ -1,6 +1,6 @@ -Matching = angular.module 'matching' +angular.module 'matching' # Directive that watches question/answer inputs and manages error states -Matching.directive 'inputStateManager', () -> +.directive 'inputStateManager', () -> restrict: 'A', link: ($scope, $element, $attrs) -> $scope.FOCUS = "focus" diff --git a/src/directives/ngDraw.coffee b/src/directives/ngDraw.coffee index a94dfe3..8a25602 100644 --- a/src/directives/ngDraw.coffee +++ b/src/directives/ngDraw.coffee @@ -1,9 +1,9 @@ # https://stackoverflow.com/questions/16587961/is-there-already-a-canvas-drawing-directive-for-angularjs-out-there # make a directive to enable Last Chance Cadet-style drawing between questions and answers -Matching = angular.module 'matching' +angular.module 'matching' -Matching.directive 'ngDraw', -> +.directive 'ngDraw', -> restrict: 'A' link: (scope, element) -> ctx = element[0].getContext '2d' diff --git a/src/directives/ngEnter.coffee b/src/directives/ngEnter.coffee index e841fa1..00e3647 100644 --- a/src/directives/ngEnter.coffee +++ b/src/directives/ngEnter.coffee @@ -1,6 +1,6 @@ -Matching = angular.module 'matching' +angular.module 'matching' -Matching.directive 'ngEnter', -> +.directive 'ngEnter', -> return (scope, element, attrs) -> element.bind("keydown keypress", (event) -> if(event.which == 13) diff --git a/src/modules/matching.coffee b/src/modules/matching.coffee index dc5ab0e..fea2022 100644 --- a/src/modules/matching.coffee +++ b/src/modules/matching.coffee @@ -1,2 +1,2 @@ # Create an angular module to import the animation module and house our controller. -Matching = angular.module( 'matching', [] ) \ No newline at end of file +angular.module( 'matching', [] ) \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 8911be9..b29a7ad 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -11,10 +11,10 @@ const entries = { path.join(srcPath, 'creator.html'), path.join(srcPath, 'modules', 'matching.coffee'), path.join(srcPath, 'controllers', 'creator.coffee'), - path.join(srcPath, 'directives', 'audioControls.coffee'), path.join(srcPath, 'directives', 'focusMe.coffee'), path.join(srcPath, 'directives', 'ngEnter.coffee'), path.join(srcPath, 'directives', 'inputStateManager.coffee'), + path.join(srcPath, 'directives', 'audioControls.coffee'), path.join(srcPath, 'creator.scss'), ], 'player': [ @@ -26,6 +26,7 @@ const entries = { ], 'audioControls': [ path.join(srcPath, 'audioControls.html'), + path.join(srcPath, 'directives', 'audioControls.coffee'), path.join(srcPath, 'audioControls.scss'), ] }