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

Can't change opacity of marker #1237

Closed
Fernando-Checa opened this issue Feb 14, 2024 · 9 comments
Closed

Can't change opacity of marker #1237

Fernando-Checa opened this issue Feb 14, 2024 · 9 comments
Labels
Milestone

Comments

@Fernando-Checa
Copy link

Describe the bug

I made a web app to create tours and when editing markers, the opacity does not change.

This is the code I use:

markersPlugin.updateMarker({ 'id' : 'mark1', 'opacity' : 0.4 });

the marker in question remains at 100% opacity

Online demo URL

No response

Photo Sphere Viewer version

5.7.0

Plugins loaded

markersPlugin

OS & browser

MacOs Sonoma, Brave Versión 1.62.162 Chromium: 121.0.6167.164 (Build oficial) (arm64)

Additional context

No response

@mistic100
Copy link
Owner

It works https://codesandbox.io/p/sandbox/nifty-oskar-nknf8m?file=%2Fsrc%2Findex.ts%3A102%2C55

Please share a demo when you have a problem.

@Fernando-Checa
Copy link
Author

Yes.. but not in my app.. let me try other things..

@Fernando-Checa
Copy link
Author

Every other property gets changed but opacity.
I don't understand what's going on.

The property gets updated in the MarkersPlugin object but not visually and remains at 100% no matter what.
If I hide the marker it hides but does not change opacity.

CleanShot 2024-02-14 at 18 44 37

Do you know anything that could be interfering?

@Fernando-Checa
Copy link
Author

If I create the marker with less opacity it works but then I can't change it to anything else.

@mistic100
Copy link
Owner

mistic100 commented Feb 14, 2024

Yes : the 3D markers do not support updating the opacity. I will fix it.

But first let me ask you something : when you have a problem you MUST start by providing an example of your code, or at least a snippet like you just did, it save you and me a LOT of time. Thanks in advance.

@mistic100 mistic100 reopened this Feb 14, 2024
@Fernando-Checa
Copy link
Author

Yes, I'm sorry. I will provide all the info I can next time.

This is how I create the marker:

{ "id": 'mm'+id, "opacity": op, "imageLayer": baseUrl + iconUrl+ target[img], "hideList": hide, //hideList: element[2], //opacity: element[3], "position": { "yaw": yaw, "pitch": pitch }, "size": { "width": x, "height": y }, "orientation": orientation, "tooltip": { "content": 'mm'+id, "position": "top center", "trigger": "hover" } }

Are imageLayer markers the same as 3Dmarkers?
I can't find them in the docs

@mistic100 mistic100 added this to the 5.7.1 milestone Feb 14, 2024
@mistic100
Copy link
Owner

yes imageLayer and videoLayer are 3D objects

Copy link

This feature/bug fix has been released in version 5.7.1.

@Fernando-Checa
Copy link
Author

Just to confirm that both the opacity and the rotation work now like a charm.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants