front_idill/extern/fajran-tuiojs/connector/npTuioClient/tuiojs.npTuioClient.js
changeset 28 9ccef81f02ab
parent 27 6c08d4d7219e
--- a/front_idill/extern/fajran-tuiojs/connector/npTuioClient/tuiojs.npTuioClient.js	Thu Apr 12 13:09:46 2012 +0200
+++ b/front_idill/extern/fajran-tuiojs/connector/npTuioClient/tuiojs.npTuioClient.js	Thu Apr 12 15:33:25 2012 +0200
@@ -1,35 +1,38 @@
+/*
+    Modified by alexandre.bastien@iri.centrepompidou.fr to manage TUIO strings.
+*/
 
 tuio.setConnector({
-	_failmsg: "Unable to initialize npTuioClient plugin.",
-	_id: "__tuiojs_connector_npTuioClient",
+    _failmsg: "Unable to initialize npTuioClient plugin.",
+    _id: "__tuiojs_connector_npTuioClient",
 
-	start: function() {
-		var el = document.getElementById(this._id);
-		if (el == undefined) {
-			var el = document.createElement('object');
-			el.setAttribute('id', this._id);
-			el.setAttribute('type', 'application/x-tuio');
-			el.appendChild(document.createTextNode(this._failmsg));
-			document.body.appendChild(el);
-		}
+    start: function() {
+        var el = document.getElementById(this._id);
+        if (el == undefined) {
+            var el = document.createElement('object');
+            el.setAttribute('id', this._id);
+            el.setAttribute('type', 'application/x-tuio');
+            el.appendChild(document.createTextNode(this._failmsg));
+            document.body.appendChild(el);
+        }
 
-		// TODO: check if the plugin can be loaded. 
-		//       if so, hide the plugin (display:none).
-	},
+        // TODO: check if the plugin can be loaded. 
+        //       if so, hide the plugin (display:none).
+    },
 
-	stop: function() {
-		var el = document.getElementById(this._id);
-		if (el != undefined) {
-			document.body.removeChild(el);
-		}
-	}
+    stop: function() {
+        var el = document.getElementById(this._id);
+        if (el != undefined) {
+            document.body.removeChild(el);
+        }
+    }
 });
 
 function tuio_callback(type, sid, fid, x, y, z, angle, code)  {
 
-	if(type < 6)
-		tuio.cursorCallback(type, sid, fid, x, y, z, angle);
-	else
-		tuio.stringCallback(type, sid, code);
+    if(type < 6)
+        tuio.cursorCallback(type, sid, fid, x, y, z, angle);
+    else
+        tuio.stringCallback(type, sid, code);
 }