Deprecate showDotCursor option for RFB constructor
It is not relevant for the connection stage so it should not have been a constructor argument to begin with. Ship with a warning for a release before we remove it.
This commit is contained in:
parent
1f2bb52850
commit
6aed0b4dd2
|
@ -1020,7 +1020,6 @@ const UI = {
|
||||||
|
|
||||||
UI.rfb = new RFB(document.getElementById('noVNC_container'), url,
|
UI.rfb = new RFB(document.getElementById('noVNC_container'), url,
|
||||||
{ shared: UI.getSetting('shared'),
|
{ shared: UI.getSetting('shared'),
|
||||||
showDotCursor: UI.getSetting('show_dot'),
|
|
||||||
repeaterID: UI.getSetting('repeaterID'),
|
repeaterID: UI.getSetting('repeaterID'),
|
||||||
credentials: { password: password } });
|
credentials: { password: password } });
|
||||||
UI.rfb.addEventListener("connect", UI.connectFinished);
|
UI.rfb.addEventListener("connect", UI.connectFinished);
|
||||||
|
@ -1034,6 +1033,7 @@ const UI = {
|
||||||
UI.rfb.clipViewport = UI.getSetting('view_clip');
|
UI.rfb.clipViewport = UI.getSetting('view_clip');
|
||||||
UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale';
|
UI.rfb.scaleViewport = UI.getSetting('resize') === 'scale';
|
||||||
UI.rfb.resizeSession = UI.getSetting('resize') === 'remote';
|
UI.rfb.resizeSession = UI.getSetting('resize') === 'remote';
|
||||||
|
UI.rfb.showDotCursor = UI.getSetting('show_dot');
|
||||||
|
|
||||||
UI.updateViewOnly(); // requires UI.rfb
|
UI.updateViewOnly(); // requires UI.rfb
|
||||||
},
|
},
|
||||||
|
|
|
@ -52,7 +52,6 @@ export default class RFB extends EventTargetMixin {
|
||||||
this._rfb_credentials = options.credentials || {};
|
this._rfb_credentials = options.credentials || {};
|
||||||
this._shared = 'shared' in options ? !!options.shared : true;
|
this._shared = 'shared' in options ? !!options.shared : true;
|
||||||
this._repeaterID = options.repeaterID || '';
|
this._repeaterID = options.repeaterID || '';
|
||||||
this._showDotCursor = options.showDotCursor || false;
|
|
||||||
this._wsProtocols = options.wsProtocols || [];
|
this._wsProtocols = options.wsProtocols || [];
|
||||||
|
|
||||||
// Internal state
|
// Internal state
|
||||||
|
@ -247,6 +246,12 @@ export default class RFB extends EventTargetMixin {
|
||||||
this._clipViewport = false;
|
this._clipViewport = false;
|
||||||
this._scaleViewport = false;
|
this._scaleViewport = false;
|
||||||
this._resizeSession = false;
|
this._resizeSession = false;
|
||||||
|
|
||||||
|
this._showDotCursor = false;
|
||||||
|
if (options.showDotCursor !== undefined) {
|
||||||
|
Log.Warn("Specifying showDotCursor as a RFB constructor argument is deprecated");
|
||||||
|
this._showDotCursor = options.showDotCursor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===== PROPERTIES =====
|
// ===== PROPERTIES =====
|
||||||
|
|
|
@ -187,11 +187,6 @@ connection to a specified VNC server.
|
||||||
- A `DOMString` specifying the ID to provide to any VNC repeater
|
- A `DOMString` specifying the ID to provide to any VNC repeater
|
||||||
encountered.
|
encountered.
|
||||||
|
|
||||||
`showDotCursor`
|
|
||||||
- A `boolean` indicating whether a dot cursor should be shown
|
|
||||||
instead of a zero-sized or fully-transparent cursor if the
|
|
||||||
server sets such invisible cursor. Disabled by default.
|
|
||||||
|
|
||||||
`wsProtocols`
|
`wsProtocols`
|
||||||
- An `Array` of `DOMString`s specifying the sub-protocols to use
|
- An `Array` of `DOMString`s specifying the sub-protocols to use
|
||||||
in the WebSocket connection. Empty by default.
|
in the WebSocket connection. Empty by default.
|
||||||
|
|
Loading…
Reference in New Issue