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

@@ -18,7 +18,7 @@ import appContext from "./app_context.js";
* @constructor
* @hideconstructor
*/
function FrontendScriptApi(startNote, currentNote, originEntity = null, tabContext = null, $container = null) {
function FrontendScriptApi(startNote, currentNote, originEntity = null, $container = null) {
const $pluginButtons = $("#plugin-buttons");
/** @property {jQuery} container of all the rendered script content */
@@ -34,9 +34,6 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
// to keep consistency with backend API
this.dayjs = dayjs;
/** @property {TabContext|null} - experimental! */
this.tabContext = tabContext;
/** @property {CollapsibleWidget} */
this.CollapsibleWidget = CollapsibleWidget;
@@ -301,19 +298,6 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null, tabConte
*/
this.getActiveTabNotePath = appContext.tabManager.getActiveTabNotePath;
/**
* This method checks whether user navigated away from the note from which the scripts has been started.
* This is necessary because script execution is async and by the time it is finished, the user might have
* already navigated away from this page - the end result would be that script might return data for the wrong
* note.
*
* @method
* @return {boolean} returns true if the original note is still loaded, false if user switched to another
*/
this.isNoteStillActive = () => {
return tabContext.note && this.originEntity.noteId === tabContext.note.noteId;
};
/**
* @method
* @param {object} $el - jquery object on which to setup the tooltip