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

projection scale not working #73

Closed
johnyang90 opened this issue Jan 4, 2021 · 1 comment
Closed

projection scale not working #73

johnyang90 opened this issue Jan 4, 2021 · 1 comment

Comments

@johnyang90
Copy link

Hi there, how could i update the scale of a projection using javascript?

@awe-media
Copy link
Owner

Hi @johnyang90 you can use the standard awe.js update API e.g.

var projection = awe.projections.view(projection_id);
projection.update({
  scale:{ x:2, y:2, z:2 }
});

Replace projection_id with the relevant id for your projection.

This will set the projection to 200% of it's default size in the x, y and z axes.

You can get a projection's existing scale using this type of code.

var x_scale = projection.scale.x;

If you find this is not working for you in some specific context please contact support AT awe.media and they'll be happy to help.

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

No branches or pull requests

2 participants