| Total Complexity | 2 |
| Complexity/F | 1 |
| Lines of Code | 24 |
| Function Count | 2 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | /** |
||
| 7 | 'use strict'; |
||
| 8 | |||
| 9 | angular.module('game').component('reactionTable', { |
||
| 10 | templateUrl: 'views/reactionTable.html', |
||
| 11 | controller: ['$scope', 'util', 'format', 'visibility', 'data', 'state', reactionTable], |
||
| 12 | controllerAs: 'ct', |
||
| 13 | bindings: { |
||
| 14 | reactor: '<', |
||
| 15 | element: '<', |
||
| 16 | title: '<' |
||
| 17 | } |
||
| 18 | }); |
||
| 19 | |||
| 20 | function reactionTable($scope, util, format, visibility, data, state) { |
||
| 21 | let ct = this; |
||
| 22 | ct.util = util; |
||
| 23 | ct.format = format; |
||
| 24 | ct.data = data; |
||
| 25 | ct.state = state; |
||
| 26 | |||
| 27 | $scope.$watch('ct.element', function() { |
||
| 28 | ct.reactionSelect = ct.reactor.availableReactions(ct.element)[0]; |
||
| 29 | }); |
||
| 30 | } |
||
| 31 |