From: Scott H. <sco...@us...> - 2005-05-27 01:33:15
|
Update of /cvsroot/actionstep/actionstep/src/org/actionstep In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16984/src/org/actionstep Modified Files: NSPoint.as NSRect.as NSSize.as NSView.as Log Message: isEqual was misnamed equalTo Index: NSView.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSView.as,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** NSView.as 26 May 2005 20:35:13 -0000 1.14 --- NSView.as 27 May 2005 01:33:06 -0000 1.15 *************** *** 481,486 **** public function setFrame(newFrame:NSRect):Void { ! var changedOrigin:Boolean = !m_frame.origin.equalTo(newFrame.origin); ! var changedSize:Boolean = !m_frame.size.equalTo(newFrame.size); if (changedSize || changedOrigin) { m_frame = newFrame.clone(); --- 481,486 ---- public function setFrame(newFrame:NSRect):Void { ! var changedOrigin:Boolean = !m_frame.origin.isEqual(newFrame.origin); ! var changedSize:Boolean = !m_frame.size.isEqual(newFrame.size); if (changedSize || changedOrigin) { m_frame = newFrame.clone(); *************** *** 721,725 **** if (view != null) { point = convertPointToView(point, view); ! if (!point.equalTo(view.bounds().origin)) { NSClipView(view).scrollToPoint(point); } --- 721,725 ---- if (view != null) { point = convertPointToView(point, view); ! if (!point.isEqual(view.bounds().origin)) { NSClipView(view).scrollToPoint(point); } *************** *** 753,757 **** scrollPoint.x += (Math.abs(ldiff) < Math.abs(rdiff)) ? (-ldiff) : rdiff; scrollPoint.y += (Math.abs(tdiff) < Math.abs(bdiff)) ? (-tdiff) : bdiff; ! if (!vRect.origin.equalTo(scrollPoint)) { scrollPoint = convertPointToView(scrollPoint, view); NSClipView(view).scrollToPoint(scrollPoint); --- 753,757 ---- scrollPoint.x += (Math.abs(ldiff) < Math.abs(rdiff)) ? (-ldiff) : rdiff; scrollPoint.y += (Math.abs(tdiff) < Math.abs(bdiff)) ? (-tdiff) : bdiff; ! if (!vRect.origin.isEqual(scrollPoint)) { scrollPoint = convertPointToView(scrollPoint, view); NSClipView(view).scrollToPoint(scrollPoint); Index: NSRect.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSRect.as,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NSRect.as 24 May 2005 20:29:25 -0000 1.7 --- NSRect.as 27 May 2005 01:33:06 -0000 1.8 *************** *** 57,61 **** } ! public function equalTo(other:NSRect):Boolean { return origin.x == other.origin.x && origin.y == other.origin.y && --- 57,61 ---- } ! public function isEqual(other:NSRect):Boolean { return origin.x == other.origin.x && origin.y == other.origin.y && Index: NSPoint.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSPoint.as,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NSPoint.as 24 May 2005 20:29:25 -0000 1.3 --- NSPoint.as 27 May 2005 01:33:06 -0000 1.4 *************** *** 44,52 **** /** The y-coordinate. */ public var y:Number; ! ! public function equalTo(other:NSPoint):Boolean { ! return x == other.x && y == other.y; ! } ! /** * Creates a new instance of NSPoint with the specified x and y --- 44,48 ---- /** The y-coordinate. */ public var y:Number; ! /** * Creates a new instance of NSPoint with the specified x and y *************** *** 73,76 **** --- 69,80 ---- /** + * Returns true if this point's x and y coordinates are the same + * as other's. + */ + public function isEqual(other:NSPoint):Boolean { + return x == other.x && y == other.y; + } + + /** * Adds point1 to point2 and returns the result. */ Index: NSSize.as =================================================================== RCS file: /cvsroot/actionstep/actionstep/src/org/actionstep/NSSize.as,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NSSize.as 26 May 2005 20:34:17 -0000 1.2 --- NSSize.as 27 May 2005 01:33:06 -0000 1.3 *************** *** 51,55 **** } ! public function equalTo(other):Boolean { return width == other.width && height == other.height } --- 51,55 ---- } ! public function isEqual(other):Boolean { return width == other.width && height == other.height } |