From 958c6fb3aab9534925c811807e8f14796a27c230 Mon Sep 17 00:00:00 2001 From: zhiteng Date: Mon, 7 Nov 2022 11:36:02 +0800 Subject: [PATCH] feat: supports disable pitch mode --- src/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 00ab745..42b4338 100644 --- a/src/index.ts +++ b/src/index.ts @@ -28,15 +28,17 @@ export class XMindEmbedViewer { el: HTMLElement | HTMLIFrameElement | string; styles?: Partial file?: ArrayBuffer; + isPitchModeDisabled?: boolean }) { const { file, el, styles = { 'height': '350px', - 'width': '750px' - } + 'width': '750px', + }, + isPitchModeDisabled } = args - const iframeController = new IframeController(el, 'https://www.xmind.app/embed-viewer') + const iframeController = new IframeController(el, `https://www.xmind.app/embed-viewer${ isPitchModeDisabled ? '?pitch-mode=disabled' : ''}`) const iframeEventChannelController = new IframeEventChannelController(iframeController, 'https://www.xmind.app') this.iframeController = iframeController