diff --git a/app/ui.js b/app/ui.js index 2542e059..3e551715 100644 --- a/app/ui.js +++ b/app/ui.js @@ -178,6 +178,7 @@ const UI = { UI.initSetting('password'); UI.initSetting('autoconnect', false); UI.initSetting('view_clip', false); + UI.initSetting('view_drag', false); UI.initSetting('resize', 'off'); UI.initSetting('quality', 6); UI.initSetting('compression', 2); @@ -1096,6 +1097,7 @@ const UI = { UI.rfb.addEventListener("bell", UI.bell); UI.rfb.addEventListener("desktopname", UI.updateDesktopName); UI.rfb.clipViewport = UI.getSetting('view_clip'); + UI.rfb.dragViewport = UI.getSetting('view_drag'); UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale'; UI.rfb.resizeSession = UI.getSetting('resize') === 'remote'; UI.rfb.qualityLevel = parseInt(UI.getSetting('quality')); diff --git a/docs/EMBEDDING.md b/docs/EMBEDDING.md index 9e927d0d..32ac049e 100644 --- a/docs/EMBEDDING.md +++ b/docs/EMBEDDING.md @@ -82,6 +82,9 @@ Currently, the following options are available: * `view_clip` - If the remote session should be clipped or use scrollbars if it cannot fit in the browser. +* `view_drag` - If the remote session is clipped enable dragging the viewport + when connected. + * `resize` - How to resize the remote session if it is not the same size as the browser window. Can be one of `off`, `scale` and `remote`. diff --git a/vnc.html b/vnc.html index 82cacd58..2d7e9b7c 100644 --- a/vnc.html +++ b/vnc.html @@ -227,6 +227,10 @@ Clip to window +
  • + + +