Skip to content

Commit

Permalink
refactor(RenderWindow): Rename rootParentMethodsToProxy
Browse files Browse the repository at this point in the history
  • Loading branch information
bruyeret authored and finetjul committed Apr 11, 2024
1 parent df57dbd commit 21534d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/Rendering/OpenGL/RenderWindow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const SCREENSHOT_PLACEHOLDER = {
height: '100%',
};

const rootParentMethodsToProxy = [
const parentMethodsToProxy = [
'activateTexture',
'deactivateTexture',
'disableCullFace',
Expand Down Expand Up @@ -198,7 +198,7 @@ function vtkOpenGLRenderWindow(publicAPI, model) {
publicAPI.initialize = () => {
if (!model.initialized) {
// Set root parent if there is one
// Some methods of the root parent are proxied (see rootParentMethodsToProxy)
// Some methods of the root parent are proxied (see parentMethodsToProxy)
model.rootOpenGLRenderWindow = publicAPI.getLastAncestorOfType(
'vtkOpenGLRenderWindow'
);
Expand Down Expand Up @@ -1258,7 +1258,7 @@ function vtkOpenGLRenderWindow(publicAPI, model) {

// Proxy some methods if needed
const publicAPIBeforeProxy = { ...publicAPI };
rootParentMethodsToProxy.forEach((methodName) => {
parentMethodsToProxy.forEach((methodName) => {
publicAPI[methodName] = (...args) => {
if (model.rootOpenGLRenderWindow) {
// Proxy only methods when the render window has a parent
Expand Down

0 comments on commit 21534d1

Please sign in to comment.