changed the way the segmentsWidget highlights the matching segments. popcorn-port
authorhamidouk
Tue, 29 Nov 2011 15:47:46 +0100
branchpopcorn-port
changeset 353 21f3a1d501eb
parent 352 cc2cdecc5ce5
child 354 002c314cabbf
changed the way the segmentsWidget highlights the matching segments.
src/js/widgets/segmentsWidget.js
--- a/src/js/widgets/segmentsWidget.js	Tue Nov 29 15:42:53 2011 +0100
+++ b/src/js/widgets/segmentsWidget.js	Tue Nov 29 15:47:46 2011 +0100
@@ -122,8 +122,7 @@
   for (var id in this.oldSearchMatches) {
 
       IriSP.jQuery("#"+id).dequeue();
-			IriSP.jQuery("#"+id).animate({height:0}, 100);
-			IriSP.jQuery("#"+id).css('border-color','lightgray');
+			IriSP.jQuery("#"+id).css('border','none');
 			IriSP.jQuery("#"+id).animate({opacity:0.3}, 100);
   }
 };
@@ -141,11 +140,10 @@
   var matches = this._serializer.searchOccurences(searchString);
 
   for (var id in matches) {
-    var factor = matches[id] * 8;
+    var factor = (0.3 + matches[id] * 0.2) % 1;
     this.selector.find("#"+id).dequeue();
-    this.selector.find("#"+id).animate({height: factor}, 200);    
-    this.selector.find("#"+id).css('border-color','red');
-    this.selector.find("#"+id).animate({opacity:0.6}, 200);
+    this.selector.find("#"+id).css('border','1px red');
+    this.selector.find("#"+id).animate({opacity:factor}, 200);
 
     IriSP.jQuery("#LdtSearchInput").css('background-color','#e1ffe1');
   }
@@ -155,9 +153,7 @@
   for (var id in this.oldSearchMatches) {
     if (!matches.hasOwnProperty(id)) {
         IriSP.jQuery("#"+id).dequeue();
-				IriSP.jQuery("#"+id).animate({height:0}, 250);				
 				IriSP.jQuery("#"+id).animate({opacity:0.3}, 200);
-        this.selector.find("#"+id).css('border','solid 1px #aaaaaa');
     }
   }