<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Latest posts from topic “Fx.Drag”</title>
  <subtitle>Latest posts from topic “Fx.Drag” on “mooforum”.</subtitle>
  <link href="http://www.mooforum.net/viewtopic.php?f=21&amp;t=2670" />
  <updated>2009-12-16T05:59:59Z</updated>
  <id>http://www.mooforum.net/viewtopic.php?f=21&amp;t=2670</id>
  <link rel="self" href="http://www.mooforum.net/generate_feed.php?content=topic_posts&amp;f%5B%5D=21&amp;t=2670" />

			<entry>
			<title>Re: Fx.Drag</title>
			<link href="http://www.mooforum.net/viewtopic.php?f=21&amp;p=9859#p9859"/>
			<id>http://www.mooforum.net/viewtopic.php?f=21&amp;p=9859#p9859</id>
			<author>
				<name>dreadcast</name>
			</author>
			<published>2010-01-07T05:43:10Z</published>
			<updated>2010-01-07T05:43:10Z</updated>
			<summary type="xhtml">
				<div xmlns="http://www.w3.org/1999/xhtml">I found this : <!-- m --><a class="postlink" href="http://mootools.net/forge/p/drag_flick">http://mootools.net/forge/p/drag_flick</a><!-- m --><br />
<br />
It can be improved of course, but that's what I was looking for !</div>
			</summary>
		</entry>
			<entry>
			<title>Fx.Drag</title>
			<link href="http://www.mooforum.net/viewtopic.php?f=21&amp;p=9528#p9528"/>
			<id>http://www.mooforum.net/viewtopic.php?f=21&amp;p=9528#p9528</id>
			<author>
				<name>dreadcast</name>
			</author>
			<published>2009-12-16T05:59:59Z</published>
			<updated>2009-12-16T05:59:59Z</updated>
			<summary type="xhtml">
				<div xmlns="http://www.w3.org/1999/xhtml">Hi all,<br />
I've found this script on the web : <!-- m --><a class="postlink" href="http://codecanyon.net/item/smooth-scroll-manager/full_screen_preview/70644">http://codecanyon.net/item/smooth-scrol ... view/70644</a><!-- m --><br />
I'd like to create such a script, which could smoothly scroll or drag elements, mootools-style (which could be called Fx.Drag or Drag.Smooth...), but I'm way too bad at maths !<br />
<br />
<br />
So I've mixed Drag and Fx.Scroll in a function :<br />
<br />
<div class="codebox"><div class="codeheader"><a href="#" onclick="linenumberOnOff('cb97257'); return false;">Line number On/Off</a> | <a href="#" onclick="expandCode('cb97257'); return false;">Expand/Contract</a> | <a href="#" onclick="selectCode(this); return false;">Select all</a></div><!-- we need this dummy div to fix a firefox bug when selecting code lines --><div class="codeholder"><div class="text" id="cb97257" style="font-family: monospace;"><ol><li style="" class="li1"><![CDATA[ ]]></li><li style="" class="li2">var contentFx = new Fx.Scroll(element, {</li><li style="" class="li1"><![CDATA[ ]]> <![CDATA[ ]]> transition: Fx.Transitions.Bounce.easeOut,</li><li style="" class="li2"><![CDATA[ ]]> <![CDATA[ ]]> duration: 1000</li><li style="" class="li1">});</li><li style="" class="li2">var drag = new Drag(element, {</li><li style="" class="li1"><![CDATA[ ]]> <![CDATA[ ]]> modifiers: {x: 'scrollLeft', y: 'scrollTop'},</li><li style="" class="li2"><![CDATA[ ]]> <![CDATA[ ]]> invert: true,</li><li style="" class="li1"><![CDATA[ ]]> <![CDATA[ ]]> style: false,</li><li style="" class="li2"><![CDATA[ ]]> <![CDATA[ ]]> onStart: function(element, event){</li><li style="" class="li1"><![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> start = {</li><li style="" class="li2"><![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> y: event.page.y,</li><li style="" class="li1"><![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> x: event.page.x</li><li style="" class="li2"><![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> }</li><li style="" class="li1"><![CDATA[ ]]> <![CDATA[ ]]> },</li><li style="" class="li2"><![CDATA[ ]]> <![CDATA[ ]]> onComplete: function(element, event){</li><li style="" class="li1"><![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> contentFx.start(</li><li style="" class="li2"><![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> element.getScroll().x + start.x - event.page.x,</li><li style="" class="li1"><![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> element.getScroll().y + start.y - event.page.y</li><li style="" class="li2"><![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> <![CDATA[ ]]> );</li><li style="" class="li1"><![CDATA[ ]]> <![CDATA[ ]]> }</li><li style="" class="li2">});</li><li style="" class="li1"><![CDATA[ ]]></li></ol></div></div></div><br />
<br />
The effect is there, but not smooth, right ?<br />
<br />
Has anyone seen this or planned developing such a script ?<br />
<br />
so long</div>
			</summary>
		</entry>
	</feed>