-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added MIP option to StackScrollTool #537
base: main
Are you sure you want to change the base?
feat: added MIP option to StackScrollTool #537
Conversation
✅ Deploy Preview for cornerstone-3d-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
4f7356a
to
6b72360
Compare
6b72360
to
76a2109
Compare
@sedghi, this PR is ready for your review! |
constructor( | ||
toolProps: PublicToolProps = {}, | ||
defaultToolProps: ToolProps = { | ||
supportedInteractionTypes: ['Mouse', 'Touch'], | ||
configuration: { | ||
invert: false, | ||
leftRightMode: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the difference between leftRightMode and mipMode? can leftRightMode be not mipMode? to me this configuration is complex and not clear at the first glance. there are multiple levels that has enabled
, how about something like
configuration: {
activeMode: 'stackScrollMode', // or 'mipMode'
stackScrollMode: {
invert: false,
loop: false,
debounceIfNotLoaded: true,
},
mipMode: {
pixelsPerThickness: 5,
minSlabThickness: 5e-2,
maxSlabThickness: 30,
},
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the following options need some way to be selected...
leftRight vs upDown
Inversion is rightLeft vs downUp
Then MIP can be active/inactive
StackScroll can be active/inactive
Both MIP and StackScroll can be active at the same time.
What about something like this:
configuration: {
direction: {
stackScrollMode: enums['upDown', 'downUp', null]
mipMode: enums['leftRight', 'rightLeft', null]
},
stackScrollMode: {
loop: false,
debounceIfNotLoaded: true,
},
mipMode: {
pixelsPerThickness: 5,
minSlabThickness: 5e-2,
maxSlabThickness: 30,
},
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about we stick to horizontal and vertical and assume (naturally) that right is more and up is more, and we have a invert flag?
configuration: {
stackScrollMode: {
enabled: true,
invert: true,
direction: 'vertical'
loop: false,
debounceIfNotLoaded: true,
},
mipMode: {
enabled: false,
invert: true,
direction: 'horizontal'
pixelsPerThickness: 5,
minSlabThickness: 5e-2,
maxSlabThickness: 30,
},
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works for me!
leftRightMode: false, | ||
mipMode: { | ||
enabled: true, | ||
invert: false, | ||
pixelsPerThickness: 5, | ||
minSlabThickness: 5e-2, | ||
maxSlabThickness: 30, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this example should get updated too right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep still need to push the changes
No description provided.