Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Sources/Rendering/Misc/FullScreenRenderWindow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import 'vtk.js/Sources/Rendering/Core/Actor';
import 'vtk.js/Sources/Rendering/Core/Mapper';
import 'vtk.js/Sources/Rendering/Misc/RenderingAPIs';

const { vtkWarningMacro } = macro;

// Process arguments from URL
const userParams = vtkURLExtract.extractURLParameters();

Expand Down Expand Up @@ -221,6 +223,10 @@ export function extend(publicAPI, model, initialValues = {}) {
'controlContainer',
]);

vtkWarningMacro(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't really prevent (i.e. bother with a warning message) anyone from using FullScreenRenderWindow.

We could think of conditionally testing if hostname is not "localhost" to decide to print a message.

An alternative is to simply document the class that resizing is not possible.

'The vtkFullScreenRenderWindow class is intended only for example development. Please use vtkGenericRenderWindow instead.'
);

// Object specific methods
vtkFullScreenRenderWindow(publicAPI, model);
}
Expand Down