<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,5 @@
+* Fixed a calculation error in Effect.Transitions.pulse that could lead to flickering, add easing and change it to be a normal 0 to 1 transition that can be used with any effects; Effect.Pulsate now uses its own implementation.  [Thomas Fuchs]
+
 * Fixed Effect.ScrollTo. Changeset 8686 had a typo, document.viewport.getScrollOffsets[0] is always undefined. Removed the max check as it is not a cross-browser way to get scroll height and breaks the effect. Depending on scrollTo to do the right thing.  Closes #11306.  [Nick Stakenburg]
 
 * Update version check so all Prototype versions can be required, not just x.x.x.  Closes #10966.  [Nick Stakenburg]</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -70,28 +70,23 @@ var Effect = {
   Transitions: {
     linear: Prototype.K,
     sinoidal: function(pos) {
-      return (-Math.cos(pos*Math.PI)/2) + 0.5;
+      return (-Math.cos(pos*Math.PI)/2) + .5;
     },
     reverse: function(pos) {
       return 1-pos;
     },
     flicker: function(pos) {
-      var pos = ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;
+      var pos = ((-Math.cos(pos*Math.PI)/4) + .75) + Math.random()/4;
       return pos &gt; 1 ? 1 : pos;
     },
     wobble: function(pos) {
-      return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;
+      return (-Math.cos(pos*Math.PI*(9*pos))/2) + .5;
     },
     pulse: function(pos, pulses) { 
-      pulses = pulses || 5; 
-      return (
-        ((pos % (1/pulses)) * pulses).round() == 0 ? 
-              ((pos * pulses * 2) - (pos * pulses * 2).floor()) : 
-          1 - ((pos * pulses * 2) - (pos * pulses * 2).floor())
-        );
+      return (-Math.cos((pos*((pulses||5)-.5)*2)*Math.PI)/2) + .5;
     },
     spring: function(pos) { 
-      return 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6)); 
+      return 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6));
     },
     none: function(pos) {
       return 0;
@@ -876,11 +871,13 @@ Effect.Shrink = function(element) {
 
 Effect.Pulsate = function(element) {
   element = $(element);
-  var options    = arguments[1] || { };
-  var oldOpacity = element.getInlineOpacity();
-  var transition = options.transition || Effect.Transitions.sinoidal;
-  var reverser   = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) };
-  reverser.bind(transition);
+  var options    = arguments[1] || { },
+    oldOpacity = element.getInlineOpacity(),
+    transition = options.transition || Effect.Transitions.linear,
+    reverser   = function(pos){ 
+      return 1 - transition((-Math.cos((pos*(options.pulses||5)*2)*Math.PI)/2) + .5);
+    };
+    
   return new Effect.Opacity(element, 
     Object.extend(Object.extend({  duration: 2.0, from: 0,
       afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }</diff>
      <filename>src/effects.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>00226c07b81ce6822c8cb1dc82f5d99f04ec39cc</id>
    </parent>
  </parents>
  <author>
    <name>Thomas Fuchs</name>
    <email>thomas@fesch.at</email>
  </author>
  <url>http://github.com/madrobby/scriptaculous/commit/b352e2b5c05a0a0642cc05cb896780cd5ca01f3e</url>
  <id>b352e2b5c05a0a0642cc05cb896780cd5ca01f3e</id>
  <committed-date>2008-05-12T00:29:09-07:00</committed-date>
  <authored-date>2008-05-12T00:29:09-07:00</authored-date>
  <message>Fixed a calculation error in Effect.Transitions.pulse that could lead to flickering, add easing and change it to be a normal 0 to 1 transition that can be used with any effects; Effect.Pulsate now uses its own implementation.</message>
  <tree>0eb92ed84a564adab1779afc94ba5529b61c323c</tree>
  <committer>
    <name>Thomas Fuchs</name>
    <email>thomas@fesch.at</email>
  </committer>
</commit>
