CDAT / vcs-js

3 stars 3 forks source link

Try to get resize working better #27

Closed scottwittenburg closed 6 years ago

scottwittenburg commented 6 years ago

The resize code path did not connect to the backend at all. This PR makes the connection that calls the vcs.canvas.resize rpc method, and only when that promise resolves does it trigger a resize on the client-side RemoteRenderer object.

Now the demo resize functionality seems to work fine in onscreen mode. However in offscreen mode there is still something wrong: the text labels don't seem to change, even though the image and scalar bar are resized properly.

This does change the behavior of the api a little though. Now instead of setting the size on the container and calling a resize method, you just call resize on the "canvas" with the new width and height. If that's a problem, we can iterate on this code change.

scottwittenburg commented 6 years ago

ping @danlipsa

danlipsa commented 6 years ago

Look good to me.