overleaf/services/web/frontend/js/ide/toolbar/EditorToolbarController.js
Jakob Ackermann e959529828 Merge pull request #15129 from overleaf/mj-jpa-angular-parameters
[web] Explicitly name angular parameters

GitOrigin-RevId: 91beae68989d6c8122132b531a4338b116d87424
2023-10-16 08:04:25 +00:00

23 lines
646 B
JavaScript

import App from '../../base'
import importOverleafModules from '../../../macros/import-overleaf-module.macro'
const eModules = importOverleafModules('editorToolbarButtons')
const editorToolbarButtons = eModules.map(item => item.import.default)
export default App.controller('EditorToolbarController', [
'$scope',
'ide',
function ($scope, ide) {
const editorButtons = []
for (const editorToolbarButton of editorToolbarButtons) {
const button = editorToolbarButton.button($scope, ide)
if (editorToolbarButton.source) {
editorButtons.push(button)
}
}
$scope.editorButtons = editorButtons
},
])