broadway: Fix up whitespace and indentation for js code

This commit is contained in:
Alexander Larsson
2011-03-15 10:33:08 +01:00
parent 520dd09e8a
commit 7605258890

View File

@ -214,8 +214,7 @@ function handleCommands(cmdObj)
lastSerial = base64_32(cmd, i);
i = i + 6;
switch (command) {
/* create new surface */
case 's':
case 's': // create new surface
var id = base64_16(cmd, i);
i = i + 3;
var x = base64_16(cmd, i);
@ -232,22 +231,19 @@ function handleCommands(cmdObj)
surfaces[id] = initContext(surface, x, y, id);
break;
/* show a surface */
case 'S':
case 'S': // Show a surface
var id = base64_16(cmd, i);
i = i + 3;
surfaces[id].canvas.style["display"] = "inline";
break;
/* hide a surface */
case 'H':
case 'H': // Hide a surface
var id = base64_16(cmd, i);
i = i + 3;
surfaces[id].canvas.style["display"] = "none";
break;
/* delete surface */
case 'd':
case 'd': // Delete surface
var id = base64_16(cmd, i);
i = i + 3;
var canvas = surfaces[id].canvas;
@ -256,8 +252,7 @@ function handleCommands(cmdObj)
break;
/* move a surface */
case 'm':
case 'm': // Move a surface
var id = base64_16(cmd, i);
i = i + 3;
var x = base64_16(cmd, i);
@ -268,8 +263,7 @@ function handleCommands(cmdObj)
surfaces[id].canvas.style["top"] = y + "px";
break;
/* resize a surface */
case 'r':
case 'r': // Resize a surface
var id = base64_16(cmd, i);
i = i + 3;
var w = base64_16(cmd, i);
@ -297,8 +291,7 @@ function handleCommands(cmdObj)
break;
/* put image data surface */
case 'i':
case 'i': // Put image data surface
var q = new Object();
q.op = 'i';
q.id = base64_16(cmd, i);
@ -319,11 +312,9 @@ function handleCommands(cmdObj)
q.img.onload = function() { handleOutstanding(); };
return false;
}
break;
/* copy rects */
case 'b':
case 'b': // Copy rects
var q = new Object();
q.op = 'b';
q.id = base64_16(cmd, i);
@ -388,7 +379,6 @@ function handleCommands(cmdObj)
doGrab(id, ownerEvents, time, false);
sendInput ("g", [GDK_GRAB_SUCCESS]);
break;
case 'u': // Ungrab
@ -673,5 +663,4 @@ function connect()
} else if (document.attachEvent) {
element.attachEvent("onmousewheel", onMouseWheel);
}
}