Skip to content

Commit

Permalink
Update bootstrap order
Browse files Browse the repository at this point in the history
  • Loading branch information
cayb0rg committed Oct 10, 2023
1 parent 670eda5 commit 518d02b
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 18 deletions.
4 changes: 1 addition & 3 deletions src/controllers/creator.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,4 @@ angular.module 'matching', ['ngAnimate']
assets: [questionMediaId, answerMediaId, answerAudioId]

Materia.CreatorCore.start materiaCallbacks
]

angular.bootstrap(document, ['matching'])
]
2 changes: 0 additions & 2 deletions src/controllers/player.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -512,5 +512,3 @@ angular.module 'matching'

Materia.Engine.start materiaCallbacks
]

angular.bootstrap(document, ['matching'])
7 changes: 4 additions & 3 deletions src/directives/audioControls.coffee
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Matching = angular.module 'matching'
angular.module 'matching'

Matching.directive 'ngAudioControls', ->
.directive 'ngAudioControls', ->
restrict: 'EA'
scope:
audioSource: '@audioSource'
Expand Down Expand Up @@ -42,4 +42,5 @@ Matching.directive 'ngAudioControls', ->
unless $scope.selectingNewTime
$scope.currentTime = $scope.audio.currentTime
$scope.$apply()
]
]
angular.bootstrap(document, ['matching'])
4 changes: 2 additions & 2 deletions src/directives/focusMe.coffee
Original file line number Diff line number Diff line change
@@ -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) ->
Expand Down
4 changes: 2 additions & 2 deletions src/directives/inputStateManager.coffee
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/directives/ngDraw.coffee
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
4 changes: 2 additions & 2 deletions src/directives/ngEnter.coffee
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/matching.coffee
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Create an angular module to import the animation module and house our controller.
Matching = angular.module( 'matching', [] )
angular.module( 'matching', [] )
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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': [
Expand All @@ -26,6 +26,7 @@ const entries = {
],
'audioControls': [
path.join(srcPath, 'audioControls.html'),
path.join(srcPath, 'directives', 'audioControls.coffee'),
path.join(srcPath, 'audioControls.scss'),
]
}
Expand Down

0 comments on commit 518d02b

Please sign in to comment.