refactored targetNote to workNote in the ScriptContext which was very confusing with relation's targetNote

This commit is contained in:
azivner
2018-08-01 10:12:54 +02:00
parent 2d24bf81dd
commit 6dc934abbe
7 changed files with 16 additions and 16 deletions

View File

@@ -4,7 +4,7 @@ import utils from './utils.js';
import infoService from './info.js';
import linkService from './link.js';
function ScriptApi(startNote, currentNote, targetNote = null) {
function ScriptApi(startNote, currentNote, workNote = null) {
const $pluginButtons = $("#plugin-buttons");
async function activateNote(notePath) {
@@ -44,7 +44,7 @@ function ScriptApi(startNote, currentNote, targetNote = null) {
params: prepareParams(params),
startNoteId: startNote.noteId,
currentNoteId: currentNote.noteId,
targetNoteId: targetNote ? targetNote.noteId : null
workNoteId: workNote ? workNote.noteId : null
});
return ret.executionResult;
@@ -53,7 +53,7 @@ function ScriptApi(startNote, currentNote, targetNote = null) {
return {
startNote: startNote,
currentNote: currentNote,
targetNote: targetNote,
workNote: workNote,
addButtonToToolbar,
activateNote,
getInstanceName: () => window.glob.instanceName,