renamed workEntity to originEntity

This commit is contained in:
azivner
2018-08-10 13:30:20 +02:00
parent 7ac109e7f7
commit 965dbcbc9a
8 changed files with 24 additions and 24 deletions

View File

@@ -1,13 +1,13 @@
import ScriptApi from './script_api.js';
import utils from './utils.js';
function ScriptContext(startNote, allNotes, workEntity = null) {
function ScriptContext(startNote, allNotes, originEntity = null) {
const modules = {};
return {
modules: modules,
notes: utils.toObject(allNotes, note => [note.noteId, note]),
apis: utils.toObject(allNotes, note => [note.noteId, ScriptApi(startNote, note, workEntity)]),
apis: utils.toObject(allNotes, note => [note.noteId, ScriptApi(startNote, note, originEntity)]),
require: moduleNoteIds => {
return moduleName => {
const candidates = allNotes.filter(note => moduleNoteIds.includes(note.noteId));