fix: well layer: enhance well name display to avoid cluttering#2433
fix: well layer: enhance well name display to avoid cluttering#2433nilscb wants to merge 1 commit intoequinor:masterfrom
Conversation
typescript/packages/subsurface-viewer/src/storybook/layers/WellsLayer.stories.tsx
Outdated
Show resolved
Hide resolved
typescript/packages/subsurface-viewer/src/storybook/layers/WellsLayer.stories.tsx
Outdated
Show resolved
Hide resolved
typescript/packages/subsurface-viewer/src/layers/wells/wellsLayer.ts
Outdated
Show resolved
Hide resolved
typescript/packages/subsurface-viewer/src/layers/wells/wellsLayer.ts
Outdated
Show resolved
Hide resolved
| const percentages = [50, 25, 75, 12.5, 87.5, 25, 75]; | ||
|
|
||
| const n = well_xyz?.length ?? 2; | ||
| if (well_xyz && n >= 2) { |
There was a problem hiding this comment.
Add some comments to explain the algorithm (are a ref to original if it comes from a known algo)
There was a problem hiding this comment.
BTW, I don't get the logic. If I understand correctly, if the algo fail with the provided percentage, a hard-coded list of percentages completely unrelated to the requested one is used.
There was a problem hiding this comment.
Please wait a bit with this code review. The Wellslayer.stories file is included by mistake
There was a problem hiding this comment.
This comment is not related to story, but to wellsLayer.ts
There was a problem hiding this comment.
This is a regular sampling along the trajectory in search of a camera visible location. It is shuffled to minimize large jumps and to tend towards the middle.
There was a problem hiding this comment.
What bothers me is that it does absolutely not take into account requested position.
I would use an approach to shift away from the requested position , not to ignore it
There was a problem hiding this comment.
What bothers me is that it does absolutely not take into account requested position.
I would use an approach to shift away from the requested position , not to ignore it
I agree, it could be better usability if the labels shifted more gradually from the requested position instead of popping up at a random position.
6af52bb to
0537835
Compare
|
The auto positioning of lables is now default off and controlled by the well property "wellNameAutoPosition" |
| const percentages = [50, 25, 75, 12.5, 87.5, 25, 75]; | ||
|
|
||
| const n = well_xyz?.length ?? 2; | ||
| if (well_xyz && n >= 2) { |
There was a problem hiding this comment.
This comment is not related to story, but to wellsLayer.ts
| /** It true label position will be auto calculated if possible to be inside view volume at all times. | ||
| * default false. | ||
| */ | ||
| wellNameAutoPosition: boolean; |
There was a problem hiding this comment.
I would rename that to adjustWellNamePosition
| const percentages = [50, 25, 75, 12.5, 87.5, 25, 75]; | ||
|
|
||
| const n = well_xyz?.length ?? 2; | ||
| if (well_xyz && n >= 2) { |
There was a problem hiding this comment.
What bothers me is that it does absolutely not take into account requested position.
I would use an approach to shift away from the requested position , not to ignore it
hkfb
left a comment
There was a problem hiding this comment.
It also appears that if you provoke a 90 degree angle on the labels by rotating the camera, then the labels disappear.
b0e9d0e to
41bbb82
Compare
41bbb82 to
886b71a
Compare
Continuation of #2433 Fixes #767 and #947 Summary of changes: * @nilscb added functionality for positioning and backgrounds for well labels * Extracted a new deck.gl layer `WellLabelLayer` which is used to render labels in the `WellsLayer`. Its props can be specified using the `wellLabel` prop in `WellsLayer` * In order to prevent z buffer fighting, z coordinates were modified by @nilscb. I modified it slightly so that a single layer can display consistently in both Orthographic and Orbit views. I also narrowed the near and far plane scope for Orthographic views in order to further reduce z buffer collision. * Created some stories to demonstrate the styling and positioning options for well labels * Added procedurally generated synthetic wells in order to demonstrate the above  --------- Co-authored-by: Nils Christian Bonnevie <nils.christian.bonnevie@gmail.com>
## [0.6.4](https://github.com/equinor/webviz-subsurface-components/compare/wsc-common@0.6.3...wsc-common@0.6.4) (2024-05-29) ### Bug Fixes * bump ajv from 8.12.0 to 8.14.0 in /typescript ([equinor#2075](equinor#2075)) ([e7194a4](equinor@e7194a4)), closes [ajv-validator/ajv#2424](ajv-validator/ajv#2424) [ajv-validator/ajv#2410](ajv-validator/ajv#2410) [ajv-validator/ajv#2428](ajv-validator/ajv#2428) [ajv-validator/ajv#2431](ajv-validator/ajv#2431) [equinor#2427](equinor#2427) [ajv-validator/ajv#2433](ajv-validator/ajv#2433) [ajv-validator/ajv#2440](ajv-validator/ajv#2440) [ajv-validator/ajv#2410](ajv-validator/ajv#2410) [equinor#2440](equinor#2440) [equinor#2427](equinor#2427) [equinor#2433](equinor#2433) [equinor#2431](equinor#2431) [equinor#2428](equinor#2428) [equinor#2410](equinor#2410) [equinor#2424](equinor#2424) [equinor#2423](equinor#2423) [equinor#2421](equinor#2421) [equinor#2406](equinor#2406) [equinor#2402](equinor#2402)
## [1.2.16](https://github.com/equinor/webviz-subsurface-components/compare/well-completions-plot@1.2.15...well-completions-plot@1.2.16) (2024-05-29) ### Bug Fixes * bump ajv from 8.12.0 to 8.14.0 in /typescript ([equinor#2075](equinor#2075)) ([e7194a4](equinor@e7194a4)), closes [ajv-validator/ajv#2424](ajv-validator/ajv#2424) [ajv-validator/ajv#2410](ajv-validator/ajv#2410) [ajv-validator/ajv#2428](ajv-validator/ajv#2428) [ajv-validator/ajv#2431](ajv-validator/ajv#2431) [equinor#2427](equinor#2427) [ajv-validator/ajv#2433](ajv-validator/ajv#2433) [ajv-validator/ajv#2440](ajv-validator/ajv#2440) [ajv-validator/ajv#2410](ajv-validator/ajv#2410) [equinor#2440](equinor#2440) [equinor#2427](equinor#2427) [equinor#2433](equinor#2433) [equinor#2431](equinor#2431) [equinor#2428](equinor#2428) [equinor#2410](equinor#2410) [equinor#2424](equinor#2424) [equinor#2423](equinor#2423) [equinor#2421](equinor#2421) [equinor#2406](equinor#2406) [equinor#2402](equinor#2402)
## [0.27.2](https://github.com/equinor/webviz-subsurface-components/compare/subsurface-viewer@0.27.1...subsurface-viewer@0.27.2) (2024-05-29) ### Bug Fixes * bump ajv from 8.12.0 to 8.14.0 in /typescript ([equinor#2075](equinor#2075)) ([e7194a4](equinor@e7194a4)), closes [ajv-validator/ajv#2424](ajv-validator/ajv#2424) [ajv-validator/ajv#2410](ajv-validator/ajv#2410) [ajv-validator/ajv#2428](ajv-validator/ajv#2428) [ajv-validator/ajv#2431](ajv-validator/ajv#2431) [equinor#2427](equinor#2427) [ajv-validator/ajv#2433](ajv-validator/ajv#2433) [ajv-validator/ajv#2440](ajv-validator/ajv#2440) [ajv-validator/ajv#2410](ajv-validator/ajv#2410) [equinor#2440](equinor#2440) [equinor#2427](equinor#2427) [equinor#2433](equinor#2433) [equinor#2431](equinor#2431) [equinor#2428](equinor#2428) [equinor#2410](equinor#2410) [equinor#2424](equinor#2424) [equinor#2423](equinor#2423) [equinor#2421](equinor#2421) [equinor#2406](equinor#2406) [equinor#2402](equinor#2402)
## [1.1.16](https://github.com/equinor/webviz-subsurface-components/compare/group-tree-plot@1.1.15...group-tree-plot@1.1.16) (2024-05-29) ### Bug Fixes * bump ajv from 8.12.0 to 8.14.0 in /typescript ([equinor#2075](equinor#2075)) ([e7194a4](equinor@e7194a4)), closes [ajv-validator/ajv#2424](ajv-validator/ajv#2424) [ajv-validator/ajv#2410](ajv-validator/ajv#2410) [ajv-validator/ajv#2428](ajv-validator/ajv#2428) [ajv-validator/ajv#2431](ajv-validator/ajv#2431) [equinor#2427](equinor#2427) [ajv-validator/ajv#2433](ajv-validator/ajv#2433) [ajv-validator/ajv#2440](ajv-validator/ajv#2440) [ajv-validator/ajv#2410](ajv-validator/ajv#2410) [equinor#2440](equinor#2440) [equinor#2427](equinor#2427) [equinor#2433](equinor#2433) [equinor#2431](equinor#2431) [equinor#2428](equinor#2428) [equinor#2410](equinor#2410) [equinor#2424](equinor#2424) [equinor#2423](equinor#2423) [equinor#2421](equinor#2421) [equinor#2406](equinor#2406) [equinor#2402](equinor#2402)
## [1.8.1](https://github.com/equinor/webviz-subsurface-components/compare/well-log-viewer@1.8.0...well-log-viewer@1.8.1) (2024-05-29) ### Bug Fixes * bump ajv from 8.12.0 to 8.14.0 in /typescript ([equinor#2075](equinor#2075)) ([e7194a4](equinor@e7194a4)), closes [ajv-validator/ajv#2424](ajv-validator/ajv#2424) [ajv-validator/ajv#2410](ajv-validator/ajv#2410) [ajv-validator/ajv#2428](ajv-validator/ajv#2428) [ajv-validator/ajv#2431](ajv-validator/ajv#2431) [equinor#2427](equinor#2427) [ajv-validator/ajv#2433](ajv-validator/ajv#2433) [ajv-validator/ajv#2440](ajv-validator/ajv#2440) [ajv-validator/ajv#2410](ajv-validator/ajv#2410) [equinor#2440](equinor#2440) [equinor#2427](equinor#2427) [equinor#2433](equinor#2433) [equinor#2431](equinor#2431) [equinor#2428](equinor#2428) [equinor#2410](equinor#2410) [equinor#2424](equinor#2424) [equinor#2423](equinor#2423) [equinor#2421](equinor#2421) [equinor#2406](equinor#2406) [equinor#2402](equinor#2402)

Uh oh!
There was an error while loading. Please reload this page.