Skip to content
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

Add hide! utility function. #98

Merged
merged 3 commits into from
Apr 7, 2019
Merged

Add hide! utility function. #98

merged 3 commits into from
Apr 7, 2019

Conversation

tkoolen
Copy link
Collaborator

@tkoolen tkoolen commented Apr 1, 2019

On top of #96.

setobject!(vis::AbstractVisualizer, geom::GeometryLike) = setobject!(vis, Object(geom))
setobject!(vis::AbstractVisualizer, geom::GeometryLike, material::AbstractMaterial) = setobject!(vis, Object(geom, material))
hide!(vis::AbstractVisualizer) = settransform!(vis, LinearMap(UniformScaling(false)))
Copy link
Owner

Choose a reason for hiding this comment

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

I think setprop!(vis, "visible", false) might be a more idiomatic way to do this. What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. I thought you might have a suggestion like that, but I didn't know the right API call. I'll change it.

@codecov-io
Copy link

codecov-io commented Apr 6, 2019

Codecov Report

Merging #98 into master will increase coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #98      +/-   ##
==========================================
+ Coverage    73.2%   73.29%   +0.08%     
==========================================
  Files          12       12              
  Lines         321      322       +1     
==========================================
+ Hits          235      236       +1     
  Misses         86       86
Impacted Files Coverage Δ
src/MeshCat.jl 30.43% <ø> (ø) ⬆️
src/abstract_visualizer.jl 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f6771c...ddcdcf0. Read the comment docs.

@tkoolen
Copy link
Collaborator Author

tkoolen commented Apr 6, 2019

Done, but I guess this should now be setvisible!(vis, visible::Bool).

@tkoolen
Copy link
Collaborator Author

tkoolen commented Apr 6, 2019

Done.

@rdeits rdeits merged commit 9451883 into rdeits:master Apr 7, 2019
@rdeits
Copy link
Owner

rdeits commented Apr 7, 2019

Thank you!

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