fix bugs
This commit is contained in:
@@ -41,6 +41,8 @@
|
||||
{
|
||||
console.log('WebSocket Error ', error);
|
||||
alert('WebSocket Error ', error);
|
||||
|
||||
//connection.onmessage({ data: "boats:50;test 1;available:164;tosti;available" })
|
||||
};
|
||||
|
||||
connection.onmessage = function (e)
|
||||
@@ -59,6 +61,13 @@
|
||||
{
|
||||
console.log("render boat", boat);
|
||||
let el = document.createElement("div");
|
||||
el.style.textAlign = "center";
|
||||
el.style.borderRadius = "10px";
|
||||
el.style.backgroundColor = "#242495";
|
||||
el.style.padding = "10px";
|
||||
el.style.margin = "5px 25%";
|
||||
el.style.color = "white";
|
||||
el.style.cursor = "pointer";
|
||||
el.id = "boat" + boat[0];
|
||||
el.innerHTML = boat[1];
|
||||
el.addEventListener('click', selectBoat);
|
||||
|
||||
Reference in New Issue
Block a user