|
|
@@ -56,6 +56,11 @@ function doConnectDirectives() {
|
|
|
},
|
|
|
};
|
|
|
wsss.send(JSON.stringify(pings2));
|
|
|
+ wsss.send(
|
|
|
+ JSON.stringify({
|
|
|
+ type: 'getPhoneSize',
|
|
|
+ }),
|
|
|
+ );
|
|
|
};
|
|
|
wsss.onerror = function (evt) {
|
|
|
wsss.close();
|
|
|
@@ -157,6 +162,14 @@ function doConnectDirectives() {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
+ if (result.type === 'getPhoneSize') {
|
|
|
+ console.log(result);
|
|
|
+ window.currentPhoneSize = {
|
|
|
+ width: result.data.width,
|
|
|
+ height: result.data.height,
|
|
|
+ };
|
|
|
+ return;
|
|
|
+ }
|
|
|
};
|
|
|
}
|
|
|
$('body').on('click', function () {
|