WorldWideTelescope / wwt-web-client

The WorldWide Telescope web client lets you explore the universe in your browser.
https://worldwidetelescope.org/webclient/
MIT License
105 stars 35 forks source link

Remove zoom feature + output image of sky #110

Open scamnasio opened 8 years ago

scamnasio commented 8 years ago

Hello, I'm embedding the WWT web client into an .html page. I have a couple of questions about functionalities:

thewebkid commented 8 years ago

Hi sara, are you embedding the web client or the embeddable web control? I don't think we have the ability to prevent zooming, but i can think of some possible workarounds if you know javascript.

As far as printing the canvas, the best way is to take a screenshot in full screen and print the image. You will only get a bit at a time, but there is no easy print solution for a sphere - especially one that is projected using TOAST.

scamnasio commented 8 years ago

Hi Ron, I'm embedding the web client, which points to the script

src="http://www.worldwidetelescope.org/scripts/wwtsdk.aspx"

I tried some workarounds to the zoom in javascript but they all failed - what are your suggestions?

scamnasio commented 8 years ago

Hi Ron, I'm embedding the web client, which points to the script src=" http://www.worldwidetelescope.org/scripts/wwtsdk.aspx". I tried some workarounds to the zoom in javascript but they all failed - what are your suggestions?

On Tue, Sep 6, 2016 at 10:15 PM, Ron notifications@github.com wrote:

Hi sara, are you embedding the web client or the embeddable web control? I don't think we have the ability to prevent zooming, but i can think of some possible workarounds if you know javascript.

As far as printing the canvas, the best way is to take a screenshot in full screen and print the image. You will only get a bit at a time, but there is no easy print solution for a sphere - especially one that is projected using TOAST.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WorldWideTelescope/wwt-web-client/issues/110#issuecomment-245154956, or mute the thread https://github.com/notifications/unsubscribe-auth/ACZcEOAC49exChqUm1KvwsqSkN1Q2ZrNks5qnh5agaJpZM4J0Dam .

Sara Camnasio

About http://saracamnasio.com/ | Connect https://www.linkedin.com/in/saracamnasio

sd

thewebkid commented 8 years ago

How about something like

var ctl = wwtlib.WWTControl.initControl("WWTCanvas");

$('canvas').on('mousewheel', function (e) {
   ctl.gotoRaDecZoom(ctl.getRA()*15, ctl.getDec(), 60, true);
});

The right ascension multiplier is a pain and is "tribal knowledge". I will see what we can do to get it into our fall release to not have to multiply by 15 using another getter. Heh.

Pinch zoom is another one you will have to trap. Look at https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events/Pinch_zoom_gestures to try to wire up something similar to the mousewheel.

We haven't been good about publicizing this, but we've been versioning the html5sdk - we have a webgl one coming in a few weeks. The aspx version is legacy - been using worldwidetelescope.org/html5sdk/1.0.0/wwtlib.js (and .min.js)

There are only 2 of us devs and a PM working part time, so it is challenging to tackle things like documenting sdk versioning. Good to know about more people who are using the sdk.