Skip to content

chore(ResliceCursorWidget): fix example#3543

Open
Jo-Byr wants to merge 1 commit into
Kitware:masterfrom
Jo-Byr:fix-reslice-cursor-widget-example
Open

chore(ResliceCursorWidget): fix example#3543
Jo-Byr wants to merge 1 commit into
Kitware:masterfrom
Jo-Byr:fix-reslice-cursor-widget-example

Conversation

@Jo-Byr

@Jo-Byr Jo-Byr commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Context

Some examples have been broken since the switch to lil-gui, the example of ResliceCursorWidget is one of them. The widgets were displayed below a white div.

Results

The example is now correctly displayed.

Changes

Added a container element, by taking inspiration from DepthTest example.

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

Tested with

npm run build
npm run docs:generate
npm run docs:build
npm run docs:build-examples
npm run docs:serve 

@Jo-Byr Jo-Byr requested a review from finetjul July 6, 2026 13:37
@Jo-Byr Jo-Byr self-assigned this Jul 6, 2026

@finetjul finetjul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you please explain what the problem is/was ?

@Jo-Byr

Jo-Byr commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Can you please explain what the problem is/was ?

I don't know why this fixes the problem.

As explained in the top comment, I noticed the example's content was present in the page, but under a blank div. I searched for a working example with a similar structure (one that uses document.createElement), which is DepthTest, and tested it.

@daker

daker commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

@Jo-Byr just remove the div with id "vtk-root" it was not used

https://github.com/Kitware/vtk-js/blob/master/Documentation/scripts/build-examples.mjs#L66

@Jo-Byr Jo-Byr force-pushed the fix-reslice-cursor-widget-example branch from eb0e1e7 to 190858a Compare July 7, 2026 06:32

@finetjul finetjul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You also need to remove it from that example code that references 'vtk-root'.

Remove unused vtk-root element from generated examples HTML
@Jo-Byr Jo-Byr force-pushed the fix-reslice-cursor-widget-example branch from 190858a to 20dbb96 Compare July 8, 2026 07:07

@finetjul finetjul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

Please edit your PR opening comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants