Welcome to mirror list, hosted at ThFree Co, Russian Federation.

utils.js « editor « modules « stores « ide « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bef21d04b2bcc71572ca4d16b4aafa1cfe9cd941 (plain)
1
2
3
4
5
6
7
8
9
10
11
import { FILE_VIEW_MODE_EDITOR } from '../../../constants';

export const createDefaultFileEditor = () => ({
  editorRow: 1,
  editorColumn: 1,
  fileLanguage: '',
  viewMode: FILE_VIEW_MODE_EDITOR,
});

export const getFileEditorOrDefault = (fileEditors, path) =>
  fileEditors[path] || createDefaultFileEditor();