<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>LPViewAnimation.j</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -27,7 +27,9 @@
  * THE SOFTWARE.
  * 
  */
- @import &lt;AppKit/CPView.j&gt;
+
+@import &lt;AppKit/CPView.j&gt;
+@import &lt;LPKit/LPViewAnimation.j&gt;
 
 
 LPSlideViewHorizontalDirection = 0;
@@ -36,59 +38,6 @@ LPSlideViewPositiveDirection = 3;
 LPSlideViewNegativeDirection = 4;
 
 
-@implementation LPSlideViewAnimation : CPAnimation
-{
-    CPArray views;
-    CPArray properties;
-}
-
-- (id)initWithDuration:(float)aDuration animationCurve:(id)anAnimationCurve
-{
-    if (self = [super initWithDuration:aDuration animationCurve:anAnimationCurve])
-    {   
-        views = [CPArray array];
-        properties = [CPArray array];
-    }
-    return self;
-}
-
-- (void)addView:(id)aView start:(CGPoint)aStart end:(CGPoint)anEnd
-{
-    if (!aStart)
-        aStart = [aView frame].origin;
-    
-    [views addObject:aView];
-    [properties addObject:{'start': aStart, 'end': anEnd}];
-}
-
-- (void)setCurrentProgress:(float)progress
-{
-	[super setCurrentProgress:progress];
-	
-	// Get the progress with respect to the animationCurve
-	progress = [self currentValue];
- 
-	for (var i = 0; i &lt; views.length; i++)
-	{
-		var property = properties[i],
-		    start = property['start'],
-			end = property['end'];
-			
-		[views[i] setFrameOrigin:CGPointMake((progress * (end.x - start.x)) + start.x, (progress * (end.y - start.y)) + start.y)];
-	}
-}
-
-- (void)startAnimation
-{
-    for (var i = 0; i &lt; views.length; i++)
-        [views[i] setFrameOrigin:properties[i]['start']];
-    
-    [super startAnimation];
-}
-
-@end
-
-
 @implementation LPSlideView : CPView
 {
     CPString slideDirection @accessors;
@@ -211,9 +160,11 @@ LPSlideViewNegativeDirection = 4;
         }
     }
     
-    var animation = [[LPSlideViewAnimation alloc] initWithDuration:animationDuration animationCurve:animationCurve];
-    [animation addView:aView start:showViewStart end:CGPointMake(0,0)];
-    [animation addView:currentView start:nil end:hideViewEnd];
+    var width = CGRectGetWidth([aView bounds]),
+        height = CGRectGetHeight([aView bounds]),
+        animation = [[LPAnimation alloc] initWithDuration:animationDuration animationCurve:animationCurve];
+    [animation addView:aView start:CGRectMake(showViewStart.x, showViewStart.y, width, height) end:CGRectMake(0,0, width, height)];
+    [animation addView:currentView start:nil end:CGRectMake(hideViewEnd.x, hideViewEnd.y, width, height)];
     [animation setDelegate:self];
     [animation startAnimation];
     </diff>
      <filename>LPSlideView.j</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>83ce515901bd63c7d320de3333601a456a1a2a32</id>
    </parent>
  </parents>
  <author>
    <name>luddep</name>
    <email>luddep@gmail.com</email>
  </author>
  <url>http://github.com/luddep/LPKit/commit/2bc8f8bc5d95775d112c9012b4b9d1c1ffb724e2</url>
  <id>2bc8f8bc5d95775d112c9012b4b9d1c1ffb724e2</id>
  <committed-date>2009-11-07T15:18:20-08:00</committed-date>
  <authored-date>2009-11-07T15:18:20-08:00</authored-date>
  <message>moved animation subclass into it's own file</message>
  <tree>94ca33b18feb18e5e9c3e85842192a966400bdd8</tree>
  <committer>
    <name>luddep</name>
    <email>luddep@gmail.com</email>
  </committer>
</commit>
