From 407297adc03830a5cdd85093df5d3c3bb08dc922 Mon Sep 17 00:00:00 2001 From: giagitom <giagitom@gmail.com> Date: Wed, 24 Aug 2022 18:21:34 +0200 Subject: [PATCH] added dpoit-enable query string --- src/apps/viewer/app.ts | 2 ++ src/apps/viewer/index.html | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/apps/viewer/app.ts b/src/apps/viewer/app.ts index 8a27a9a4c..59bcf4793 100644 --- a/src/apps/viewer/app.ts +++ b/src/apps/viewer/app.ts @@ -88,6 +88,7 @@ const DefaultViewerOptions = { pickScale: PluginConfig.General.PickScale.defaultValue, pickPadding: PluginConfig.General.PickPadding.defaultValue, enableWboit: PluginConfig.General.EnableWboit.defaultValue, + enableDpoit: PluginConfig.General.EnableDpoit.defaultValue, preferWebgl1: PluginConfig.General.PreferWebGl1.defaultValue, viewportShowExpand: PluginConfig.Viewport.ShowExpand.defaultValue, @@ -158,6 +159,7 @@ export class Viewer { [PluginConfig.General.PickScale, o.pickScale], [PluginConfig.General.PickPadding, o.pickPadding], [PluginConfig.General.EnableWboit, o.enableWboit], + [PluginConfig.General.EnableDpoit, o.enableDpoit], [PluginConfig.General.PreferWebGl1, o.preferWebgl1], [PluginConfig.Viewport.ShowExpand, o.viewportShowExpand], [PluginConfig.Viewport.ShowControls, o.viewportShowControls], diff --git a/src/apps/viewer/index.html b/src/apps/viewer/index.html index c63978410..f7feb4d87 100644 --- a/src/apps/viewer/index.html +++ b/src/apps/viewer/index.html @@ -60,6 +60,7 @@ var pickScale = getParam('pick-scale', '[^&]+').trim(); var pickPadding = getParam('pick-padding', '[^&]+').trim(); var disableWboit = getParam('disable-wboit', '[^&]+').trim() === '1'; + var enableDpoit = getParam('enable-dpoit', '[^&]+').trim() === '1'; var preferWebgl1 = getParam('prefer-webgl1', '[^&]+').trim() === '1' || void 0; molstar.Viewer.create('app', { @@ -74,7 +75,8 @@ pixelScale: parseFloat(pixelScale) || 1, pickScale: parseFloat(pickScale) || 0.25, pickPadding: isNaN(parseFloat(pickPadding)) ? 1 : parseFloat(pickPadding), - enableWboit: disableWboit ? false : void 0, // use default value if disable-wboit is not set + enableWboit: (disableWboit || enableDpoit) ? false : void 0, // use default value if disable-wboit is not set + enableDpoit: enableDpoit ? true : void 0, preferWebgl1: preferWebgl1, }).then(viewer => { var snapshotId = getParam('snapshot-id', '[^&]+').trim(); -- GitLab