From 28cde44eb55276b90700417e42cad112e482bbf0 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Mon, 25 May 2020 15:58:58 -0400 Subject: [PATCH] rework settings some more --- src/editor.ts | 88 +++++++++++++++++++++++++++++++++++++++++---------- src/index.ts | 16 ++++++++-- 2 files changed, 85 insertions(+), 19 deletions(-) diff --git a/src/editor.ts b/src/editor.ts index b0d0e73..b447a06 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -28,13 +28,19 @@ import "../style/index.css"; const STATIC = URLExt.join(PageConfig.getBaseUrl(), "static"); +/** + * The path on the server to base application HTML, to be served in an iframe + */ const DRAWIO_URL = URLExt.join( STATIC, "lab", "node_modules/jupyterlab-drawio/drawio/src/main/webapp/index.html" ); -const DEBUG = window.location.hash.indexOf("DRAWIO_DEBUG") > -1; +/** + * Escape hatch for runtime debugging. + */ +export const DEBUG = window.location.hash.indexOf("DRAWIO_DEBUG") > -1; /** * Core URL params that are required to function properly @@ -64,9 +70,13 @@ const DRAWIO_CLASS = "jp-Drawio"; const READY_CLASS = "jp-Drawio-ready"; +/** + * A document for using offline drawio in an iframe + */ export class DrawioWidget extends DocumentWidget