layout fixes

This commit is contained in:
zadam
2020-02-25 19:19:10 +01:00
parent 7270bf287d
commit 3752cf8cba
8 changed files with 14 additions and 29 deletions

View File

@@ -2,7 +2,7 @@ import FrontendScriptApi from './frontend_script_api.js';
import utils from './utils.js';
import treeCache from './tree_cache.js';
async function ScriptContext(startNoteId, allNoteIds, originEntity = null, tabContext = null, $container = null) {
async function ScriptContext(startNoteId, allNoteIds, originEntity = null, $container = null) {
const modules = {};
const startNote = await treeCache.getNote(startNoteId);
@@ -11,7 +11,7 @@ async function ScriptContext(startNoteId, allNoteIds, originEntity = null, tabCo
return {
modules: modules,
notes: utils.toObject(allNotes, note => [note.noteId, note]),
apis: utils.toObject(allNotes, note => [note.noteId, new FrontendScriptApi(startNote, note, originEntity, tabContext, $container)]),
apis: utils.toObject(allNotes, note => [note.noteId, new FrontendScriptApi(startNote, note, originEntity, $container)]),
require: moduleNoteIds => {
return moduleName => {
const candidates = allNotes.filter(note => moduleNoteIds.includes(note.noteId));