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

instance viewport resize event not sent to the server #48

Open
keesj opened this issue Jul 12, 2021 · 5 comments
Open

instance viewport resize event not sent to the server #48

keesj opened this issue Jul 12, 2021 · 5 comments

Comments

@keesj
Copy link

keesj commented Jul 12, 2021

It appears that the SDK is not sending "instance viewport resize" events to the back-end.
I initial filed this issue in the play-with-docker.github.io project butrepository is better suited. I hope a fix can be implemented.

play-with-docker/play-with-docker.github.io#225

(pwd)
saved

(sdk)
saved2

@marcosnils
Copy link
Contributor

image

It's doing this for me on https://training.play-with-docker.com. If I either resize the browser window or move the bar in the middle, the event is sent correctly to the backend.

Can you check if it works for you on that URL?

@keesj
Copy link
Author

keesj commented Jul 12, 2021

@marcosnils I am sorry I did not try it on that URL before. It indeed does work on that URL. I am still quite new to javascript (and also docker) I only see https://github.com/play-with-docker/sdk/blob/master/src/index.ts#L242 but to me it looks like and incoming message. I will continue and compare https://training.play-with-docker.com/ops-s1-hello/ with my results

@keesj keesj closed this as completed Jul 12, 2021
@marcosnils
Copy link
Contributor

No worries! Happy to help investigating what might be happening.

Ping here if you're still having issues and can't make progress.

@keesj
Copy link
Author

keesj commented Jul 13, 2021

Having an other look at it the web page on training.play-with-docker.com does have code to emit the changes
e.g. https://cdn.rawgit.com/play-with-docker/sdk/74a853bbc404ce08c091a4b2c6f1de52df0da933/dist/pwd.js
does contain

if(this.instances[e].terms)for(var t=0;t<this.instances[e].terms.length;t++){var r=this.instances[e].terms[t],o=r.proposeGeometry();if(o.cols&&o.rows)return this.socket.emit("instance viewport resize",o.cols,o.rows)}}

This code is not visible on the master branch. I did some digging and found that commit
pwd sdk 3.0 removed the emit

hmm the code there is already commented but at least I can say that the website is not running on the latetsed sdk

@keesj keesj reopened this Jul 13, 2021
@keesj
Copy link
Author

keesj commented Aug 23, 2021

ping

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