shlightly improve mouse event management V00.14
authorYves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
Mon, 21 Feb 2011 11:15:34 +0100
changeset 57 5422b3d398c5
parent 56 0829cd5dc6e8
child 58 57a17386f41b
shlightly improve mouse event management
.project
.settings/.jsdtscope
.settings/org.eclipse.wst.jsdt.ui.superType.container
.settings/org.eclipse.wst.jsdt.ui.superType.name
web/rsln/polemicaltimeline.php
web/rsln/res/metadataplayer/src/js/new 3.txt
--- a/.project	Fri Feb 18 19:50:52 2011 +0100
+++ b/.project	Mon Feb 21 11:15:34 2011 +0100
@@ -6,6 +6,11 @@
 	</projects>
 	<buildSpec>
 		<buildCommand>
+			<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
 			<name>org.python.pydev.PyDevBuilder</name>
 			<arguments>
 			</arguments>
@@ -13,5 +18,6 @@
 	</buildSpec>
 	<natures>
 		<nature>org.python.pydev.pythonNature</nature>
+		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
 	</natures>
 </projectDescription>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.settings/.jsdtscope	Mon Feb 21 11:15:34 2011 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path=""/>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+		<attributes>
+			<attribute name="hide" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+	<classpathentry kind="output" path=""/>
+</classpath>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container	Mon Feb 21 11:15:34 2011 +0100
@@ -0,0 +1,1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name	Mon Feb 21 11:15:34 2011 +0100
@@ -0,0 +1,1 @@
+Window
\ No newline at end of file
--- a/web/rsln/polemicaltimeline.php	Fri Feb 18 19:50:52 2011 +0100
+++ b/web/rsln/polemicaltimeline.php	Mon Feb 21 11:15:34 2011 +0100
@@ -156,14 +156,14 @@
 		});
 		
 		
-		<!-- LIMIT TEXTAREA:
+		//<!-- LIMIT TEXTAREA:
 		function imposemax(Object)
 		{
 		  return (Object.value.length <= 140);
 		}
 		// End -->
 		
-		<!-- TIMER 
+		//<!-- TIMER 
 		var c=0;
 		var t;
 		var timer_is_on=0;
@@ -248,7 +248,7 @@
   	$(document).mousemove(function(e){
 		if (over){
 			tip.css("left", e.pageX-106).css("top", e.pageY-160);
-			tip.css("color", tipColor)
+			tip.css("color", tipColor);
 			tip.text(tipText);
 		}
 	});
@@ -436,7 +436,7 @@
 					width:650,
 					height:70,
 					heightmax:70
-					}
+					};
 	// Make and define the Raphael area
 	//var paper = Raphael(document.getElementById(config.target),config.width, config.height);
 	
@@ -444,7 +444,8 @@
 	function ChartTimeLine (){
 		
 		//var paper = Raphael(config.x, config.y,config.width, config.height);
-		var paper = Raphael(document.getElementById("chartTimeline"),config.width, config.height);
+		var paper = Raphael(config.target,config.width, config.height);
+		var current = null;
 		paper.rect(0,20,config.width,config.heightmax-20).attr({fill:"#fff","stroke-width":0.1,opacity: 0.1});	
 		paper.rect(0,20,config.width,1).attr({fill:"#fff",stroke: "none"});	
 		paper.rect(0,20,config.width,1).attr({fill:"#fff",stroke: "none"});	
@@ -485,11 +486,11 @@
 			// ou Frame vide 
 		};
 		Frames.prototype.draw = function(){
-		}
+		};
 		Frames.prototype.zoom = function(){
-		}
+		};
 		Frames.prototype.inside = function(){
-		}
+		};
 		var Clusters = function(){
 			var Object;
 			var yDist;
@@ -502,7 +503,7 @@
 			// make my object
 		};
 		var Tweet = function(){
-		}
+		};
 		// Classes =======================================================================
 		
 		
@@ -556,7 +557,7 @@
 													yframe:Myframe,
 													title:item.content['title'],
 													timeframe:item.begin
-													}
+													};
 										numberOfTweet+=1;
 								}
 						}else{
@@ -568,7 +569,7 @@
 										yframe:Myframe,
 										title:item.content['title'],
 										timeframe:item.begin
-							}
+							};
 							numberOfTweet+=1;
 						}
 						
@@ -625,7 +626,7 @@
 				for (var j=0; j<6; j++){		
 					if (frames[i]!=undefined){
 						if (frames[i].qualifVol[j]!=undefined){
-							moy += frames[i].qualifVol[j]
+							moy += frames[i].qualifVol[j];
 						}
 					}
 				}
@@ -634,7 +635,7 @@
 			}
 		
 			var tweetDrawed = new Array();
-			var TweetHeight = 5;
+			var TweetHeight = 5;			
 			// DRAW  TWEETS ============================================
 			for(var i=0; i<nbrframes;i++) {
 				var addEheight = 5;
@@ -655,12 +656,30 @@
 									e.time= frames[i].mytweetsID[k].timeframe;
 									e.title= frames[i].mytweetsID[k].title;
 									e.mouseover(function () {
-										this.attr({stroke:"#fff","stroke-width":5});
-										this.toFront();
+										if(this != current) {
+											to = this.attr("timeout");
+											if(to != null) {
+												clearTimeout(to);
+											}
+											if(current != null) {
+												current.attr({stroke:"#00","stroke-width":0.1});
+											}
+											this.attr({stroke:"#fff","stroke-width":5});
+											this.toFront();
+											var elem = this;
+											this.attr("timeout", 
+												setTimeout(function() {
+													elem.attr({stroke:"#00","stroke-width":0.1});
+													current = null;
+												}, 10000));
+											current = this;
+										}
 									}).mouseout(function () {
-										this.attr({stroke:"#00","stroke-width":0.1});	
+										this.attr({stroke:"#00","stroke-width":0.1});
+										current = null;
+										clearTimeout(this.attr("timeout"));
 									}).mousedown(function () {
-										__IriSP.MyApiPlayer.seek(this.time/1000)
+										__IriSP.MyApiPlayer.seek(this.time/1000);
 									});
 									$(e.node).attr('id', 't'+k+'');
 									$(e.node).attr('title', frames[i].mytweetsID[k].title);
--- a/web/rsln/res/metadataplayer/src/js/new  3.txt	Fri Feb 18 19:50:52 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-2011-02-15 :: Strate 
-
-
-Malik ::: interactif 
-	interet : nouveau domaine 
-	design  : rendre les changes accessible 
-
-Joffrey ::: prodouit 
-	design : penser a quelque chose 
-	
-Chloé ::: interactif 
-	+ poetique 
-	+ libre 
-	+ sensoriel 
-	
-Jean Raphael :::  master 
-	conduite de l'innovation 
-	notion de système 
-	processus iteratif permanent 
\ No newline at end of file