<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Small update to ProtoFlow.</title>
	<link>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/</link>
	<description>Deensoft blog</description>
	<pubDate>Wed, 19 Nov 2008 02:20:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: Kent</title>
		<link>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-2589</link>
		<dc:creator>Kent</dc:creator>
		<pubDate>Tue, 29 Apr 2008 10:21:59 +0000</pubDate>
		<guid>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-2589</guid>
		<description>Hey there,

I'd love to use this (hoverbox mod and all). But I also get the non-working links. The URL appears in the status bar, but clicking on the image doesn't activate the link. Using Mac browsers as in the post above.

Has this been addressed?

Also, the zip download does not contain the resizer.js . Don't know if it's necessary for anything here, but I get the activity error of its absence.</description>
		<content:encoded><![CDATA[<p>Hey there,</p>
<p>I&#8217;d love to use this (hoverbox mod and all). But I also get the non-working links. The URL appears in the status bar, but clicking on the image doesn&#8217;t activate the link. Using Mac browsers as in the post above.</p>
<p>Has this been addressed?</p>
<p>Also, the zip download does not contain the resizer.js . Don&#8217;t know if it&#8217;s necessary for anything here, but I get the activity error of its absence.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: V Neal</title>
		<link>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-1716</link>
		<dc:creator>V Neal</dc:creator>
		<pubDate>Wed, 16 Apr 2008 19:32:03 +0000</pubDate>
		<guid>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-1716</guid>
		<description>Hi there. I've just downloaded the latest version of ProtoFlow and have it all set up on http://test.vauxhalldiagnostics.co.uk, however, i'm having issues with my links. They dont seem to work. I'm on a mac and have tried viewing with various browsers - firefox, opera, safari.

I'm a noobie to js so any help you can give me woulod be great.

thanks :-)</description>
		<content:encoded><![CDATA[<p>Hi there. I&#8217;ve just downloaded the latest version of ProtoFlow and have it all set up on <a href="http://test.vauxhalldiagnostics.co.uk," rel="nofollow" onclick="javascript:urchinTracker ('/outbound/comment/test.vauxhalldiagnostics.co.uk,');">http://test.vauxhalldiagnostics.co.uk,</a> however, i&#8217;m having issues with my links. They dont seem to work. I&#8217;m on a mac and have tried viewing with various browsers - firefox, opera, safari.</p>
<p>I&#8217;m a noobie to js so any help you can give me woulod be great.</p>
<p>thanks <img src='http://blog.deensoft.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith</title>
		<link>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-166</link>
		<dc:creator>Keith</dc:creator>
		<pubDate>Fri, 04 Apr 2008 23:08:10 +0000</pubDate>
		<guid>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-166</guid>
		<description>I know it is a complete hack but by editing the numbers in the two lines of protoflow.js with the 'HACK' comment below I was able to get my flow centered.

    /**
     * function: moveTo
     * Actually moves the images based on the position provided by  function
     * 
     * parameters:
     * currentPos - {int} Position to move to
     */
    moveTo: function(currentPos){
        var x = currentPos;
        this.currPos = currentPos;
        var width = Element.getWidth(this.elem) * 90 / 100; /* HACK */
        var height = Element.getHeight(this.elem);
        
        var top = this.elem.offsetTop;
        var size = width * 0.49;
        var biggest = height;
        var zIndex = this.stackCount;
        this.stack.each(function(elem, index){
        
            Element.absolutize(elem);
            elem.setAttribute("index", index);
            
            if (this.options.useReflection) {
                elem.down(1).setAttribute('index', index);
            }
            var z = Math.sqrt(10000 + x * x * 1) + 100;
            var xs = x / z * size + size;
            elem.setStyle({
                left: ((xs - 40 / z * biggest) - 22) + "px", /* HACK */
                top: (30 / z * size + 0) + "px",
                width: (100 / z * biggest) + "px",
                height: (110.25 / z * biggest) + "px",
                textAlign: "center"
            });
            //console.log(elem);
            elem.style.zIndex = zIndex;
            
            if (x &#60; 0) 
                zIndex++;
            else 
                zIndex--;
            x += this.options.flex;
            
        }.bind(this));
    },</description>
		<content:encoded><![CDATA[<p>I know it is a complete hack but by editing the numbers in the two lines of protoflow.js with the &#8216;HACK&#8217; comment below I was able to get my flow centered.</p>
<p>    /**<br />
     * function: moveTo<br />
     * Actually moves the images based on the position provided by  function<br />
     *<br />
     * parameters:<br />
     * currentPos - {int} Position to move to<br />
     */<br />
    moveTo: function(currentPos){<br />
        var x = currentPos;<br />
        this.currPos = currentPos;<br />
        var width = Element.getWidth(this.elem) * 90 / 100; /* HACK */<br />
        var height = Element.getHeight(this.elem);</p>
<p>        var top = this.elem.offsetTop;<br />
        var size = width * 0.49;<br />
        var biggest = height;<br />
        var zIndex = this.stackCount;<br />
        this.stack.each(function(elem, index){</p>
<p>            Element.absolutize(elem);<br />
            elem.setAttribute(&#8221;index&#8221;, index);</p>
<p>            if (this.options.useReflection) {<br />
                elem.down(1).setAttribute(&#8217;index&#8217;, index);<br />
            }<br />
            var z = Math.sqrt(10000 + x * x * 1) + 100;<br />
            var xs = x / z * size + size;<br />
            elem.setStyle({<br />
                left: ((xs - 40 / z * biggest) - 22) + &#8220;px&#8221;, /* HACK */<br />
                top: (30 / z * size + 0) + &#8220;px&#8221;,<br />
                width: (100 / z * biggest) + &#8220;px&#8221;,<br />
                height: (110.25 / z * biggest) + &#8220;px&#8221;,<br />
                textAlign: &#8220;center&#8221;<br />
            });<br />
            //console.log(elem);<br />
            elem.style.zIndex = zIndex;</p>
<p>            if (x &lt; 0)<br />
                zIndex++;<br />
            else<br />
                zIndex&#8211;;<br />
            x += this.options.flex;</p>
<p>        }.bind(this));<br />
    },</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith</title>
		<link>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-165</link>
		<dc:creator>Keith</dc:creator>
		<pubDate>Fri, 04 Apr 2008 22:19:09 +0000</pubDate>
		<guid>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-165</guid>
		<description>Thanks for the reply and thanks for such a great effect.

Unfortunately I'm completely at a loss when it comes to Javascript. This is why the Grails solution appealed to me.</description>
		<content:encoded><![CDATA[<p>Thanks for the reply and thanks for such a great effect.</p>
<p>Unfortunately I&#8217;m completely at a loss when it comes to Javascript. This is why the Grails solution appealed to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Obaid</title>
		<link>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-164</link>
		<dc:creator>Obaid</dc:creator>
		<pubDate>Fri, 04 Apr 2008 14:21:36 +0000</pubDate>
		<guid>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-164</guid>
		<description>Keith: That is a known issue. Unfortunately, due to some other projects, I haven't had time to investigate it as much as I would like. But I am positive that soon there will be fix posted.

If you find someting please feel free to share :)</description>
		<content:encoded><![CDATA[<p>Keith: That is a known issue. Unfortunately, due to some other projects, I haven&#8217;t had time to investigate it as much as I would like. But I am positive that soon there will be fix posted.</p>
<p>If you find someting please feel free to share <img src='http://blog.deensoft.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith</title>
		<link>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-163</link>
		<dc:creator>Keith</dc:creator>
		<pubDate>Fri, 04 Apr 2008 02:12:27 +0000</pubDate>
		<guid>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-163</guid>
		<description>Shame, square images are still not centered. So close!</description>
		<content:encoded><![CDATA[<p>Shame, square images are still not centered. So close!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith</title>
		<link>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-162</link>
		<dc:creator>Keith</dc:creator>
		<pubDate>Fri, 04 Apr 2008 02:04:18 +0000</pubDate>
		<guid>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-162</guid>
		<description>I have posted this related message on the Grails mailing list. 

http://www.nabble.com/Richui-flow-widget-issues-td16477103.html

From these comments it looks like I should use square images to solve one of my issues (i.e. the issue of not being centered) bt I'm still at a loss for the link not working :(</description>
		<content:encoded><![CDATA[<p>I have posted this related message on the Grails mailing list. </p>
<p><a href="http://www.nabble.com/Richui-flow-widget-issues-td16477103.html" rel="nofollow" onclick="javascript:urchinTracker ('/outbound/comment/www.nabble.com');">http://www.nabble.com/Richui-flow-widget-issues-td16477103.html</a></p>
<p>From these comments it looks like I should use square images to solve one of my issues (i.e. the issue of not being centered) bt I&#8217;m still at a loss for the link not working <img src='http://blog.deensoft.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Obaid</title>
		<link>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-136</link>
		<dc:creator>Obaid</dc:creator>
		<pubDate>Mon, 31 Mar 2008 15:33:59 +0000</pubDate>
		<guid>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-136</guid>
		<description>Martin: Your changes are now integrated and are live.

Fabian: Can you submit your code as well? So that I can integrate it? I am working on the image resize issue where non-square images can be rendered properly.

Thanks guys!</description>
		<content:encoded><![CDATA[<p>Martin: Your changes are now integrated and are live.</p>
<p>Fabian: Can you submit your code as well? So that I can integrate it? I am working on the image resize issue where non-square images can be rendered properly.</p>
<p>Thanks guys!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jharr</title>
		<link>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-135</link>
		<dc:creator>jharr</dc:creator>
		<pubDate>Mon, 31 Mar 2008 15:10:41 +0000</pubDate>
		<guid>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-135</guid>
		<description>Great update - really appreciate the effort you're putting into this. Thanks for the comments inline as well - hopefully the community can have a hand in moving this forward. Kudos again.</description>
		<content:encoded><![CDATA[<p>Great update - really appreciate the effort you&#8217;re putting into this. Thanks for the comments inline as well - hopefully the community can have a hand in moving this forward. Kudos again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: martin</title>
		<link>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-134</link>
		<dc:creator>martin</dc:creator>
		<pubDate>Mon, 31 Mar 2008 12:36:13 +0000</pubDate>
		<guid>http://blog.deensoft.com/2008/03/26/small-update-to-protoflow/#comment-134</guid>
		<description>Hello and thanks for your work. This is my little contribution :

In the method initialize :

if(this.options.enableKeyboard) {
  document.observe('keyup', (function(e) {
    var code = e.keyCode;
    if(37 == code) this.previous();				
    if(39 == code) this.next();
  }).bind(this));			
}
		
if(this.options.enableMouse) {
  var eventType = Prototype.Browser.Gecko ? "DOMMouseScroll" : "mousewheel";
			
  Event.observe(this.elem, eventType, (function(e) {
    this.enableMouse(e);
  }).bind(this), false);
			
  if (this.useCaptions) {
    Event.observe(this.captionHolder, eventType, (function(e) {
      this.enableMouse(e);
    }).bind(this), false);
  }
}

Additional methods in the class :

decreaseIndex: function(e) {
  if(this.currIndex &#62; 0)
    this.currIndex--;	
},
	
increaseIndex: function(e) {
  if (this.currIndex &#60; this.getStackCount() - 1)
    this.currIndex++;
},
	
previous: function(e) {
  this.decreaseIndex();
  this.toCurrentIndex();
},
	
next: function(e) {
  this.increaseIndex();
  this.toCurrentIndex();
},
	
enableMouse: function(e) {
  Event.wheel(e) &#60; 0 ? this.next() : this.previous();
},
	
toCurrentIndex: function(e) {
  this.goTo(this.currIndex);
  this.updateSlider(this.currIndex);		
}

I also suggest to change the disable links method. I think that changing the href attribute is not a good idea because it can be use by another script (ex : lightbox).

In the following method I just suppress the default link behaviour :

disableLinks: function(){
  this.elem.select("a").each(function(a){
    a.observe('click', function(e) {
      e.preventDefault();
    });
  });
}

And finally the wheel method from Frank Monnerjahn :

Object.extend(Event, {
  wheel: function(event){

  var delta = 0;
  if (!event) event = window.event;

  if (event.wheelDelta) {
    delta = event.wheelDelta/120;    
    if (window.opera) delta = -delta;

  } else if (event.detail) { 
    delta = -event.detail/3;
  }

  return Math.round(delta); //Safari Round
  }

});

Hope this helps.</description>
		<content:encoded><![CDATA[<p>Hello and thanks for your work. This is my little contribution :</p>
<p>In the method initialize :</p>
<p>if(this.options.enableKeyboard) {<br />
  document.observe(&#8217;keyup&#8217;, (function(e) {<br />
    var code = e.keyCode;<br />
    if(37 == code) this.previous();<br />
    if(39 == code) this.next();<br />
  }).bind(this));<br />
}</p>
<p>if(this.options.enableMouse) {<br />
  var eventType = Prototype.Browser.Gecko ? &#8220;DOMMouseScroll&#8221; : &#8220;mousewheel&#8221;;</p>
<p>  Event.observe(this.elem, eventType, (function(e) {<br />
    this.enableMouse(e);<br />
  }).bind(this), false);</p>
<p>  if (this.useCaptions) {<br />
    Event.observe(this.captionHolder, eventType, (function(e) {<br />
      this.enableMouse(e);<br />
    }).bind(this), false);<br />
  }<br />
}</p>
<p>Additional methods in the class :</p>
<p>decreaseIndex: function(e) {<br />
  if(this.currIndex &gt; 0)<br />
    this.currIndex&#8211;;<br />
},</p>
<p>increaseIndex: function(e) {<br />
  if (this.currIndex &lt; this.getStackCount() - 1)<br />
    this.currIndex++;<br />
},</p>
<p>previous: function(e) {<br />
  this.decreaseIndex();<br />
  this.toCurrentIndex();<br />
},</p>
<p>next: function(e) {<br />
  this.increaseIndex();<br />
  this.toCurrentIndex();<br />
},</p>
<p>enableMouse: function(e) {<br />
  Event.wheel(e) &lt; 0 ? this.next() : this.previous();<br />
},</p>
<p>toCurrentIndex: function(e) {<br />
  this.goTo(this.currIndex);<br />
  this.updateSlider(this.currIndex);<br />
}</p>
<p>I also suggest to change the disable links method. I think that changing the href attribute is not a good idea because it can be use by another script (ex : lightbox).</p>
<p>In the following method I just suppress the default link behaviour :</p>
<p>disableLinks: function(){<br />
  this.elem.select(&#8221;a&#8221;).each(function(a){<br />
    a.observe(&#8217;click&#8217;, function(e) {<br />
      e.preventDefault();<br />
    });<br />
  });<br />
}</p>
<p>And finally the wheel method from Frank Monnerjahn :</p>
<p>Object.extend(Event, {<br />
  wheel: function(event){</p>
<p>  var delta = 0;<br />
  if (!event) event = window.event;</p>
<p>  if (event.wheelDelta) {<br />
    delta = event.wheelDelta/120;<br />
    if (window.opera) delta = -delta;</p>
<p>  } else if (event.detail) {<br />
    delta = -event.detail/3;<br />
  }</p>
<p>  return Math.round(delta); //Safari Round<br />
  }</p>
<p>});</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
