Skip to content

Commit 7ae39e4

Browse files
author
Caspar Oostendorp
committed
Prepare v0.3.6
1 parent 62ebf90 commit 7ae39e4

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.5
1+
0.3.6

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pixelaw-web",
33
"private": true,
4-
"version": "0.3.5",
4+
"version": "0.3.6",
55
"type": "module",
66
"packageManager": "yarn@1.22.19",
77
"scripts": {

‎src/webtools/hooks/UpdateService.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export const useUpdateService = (url: string | undefined): UpdateService => {
4545

4646
socket.current.onmessage = (event) => {
4747
const msg: Message = JSON.parse(event.data);
48+
console.log(msg)
4849
if (msg.cmd === "tileChanged") {
4950
const tileChangedMsg = msg.data as TileChangedMessage;
5051

@@ -60,13 +61,14 @@ export const useUpdateService = (url: string | undefined): UpdateService => {
6061
const setBounds = (newBounds: Bounds) => {
6162
if(!url) return
6263

64+
bounds.current = newBounds
6365
if(!socket.current || socket.current.readyState !== WebSocket.OPEN){
66+
console.log("early")
6467
initializeSocket(url)
6568
}else{
6669
if(!bounds.current || !areBoundsEqual(newBounds, bounds.current)){
6770
const message = JSON.stringify({cmd: "subscribe", data: {boundingBox: newBounds}})
6871
socket.current!.send(message)
69-
bounds.current = newBounds
7072
}
7173
}
7274
}

0 commit comments

Comments
 (0)