Created
January 18, 2012 21:17
-
-
Save toddfreese/1635709 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| var origin = _frame.origin; | |
| if (!aPoint || (origin.x == aPoint.x && origin.y == aPoint.y)) | |
| return; | |
| origin.x = aPoint.x; | |
| origin.y = aPoint.y; | |
| if (_postsFrameChangedNotifications && !_inhibitFrameAndBoundsChangedNotifications) | |
| objj_msgSend(CachedNotificationCenter, "postNotificationName:object:", CPViewFrameDidChangeNotification, self); | |
| var transform = _superview ? _superview._boundsTransform : NULL; | |
| if (transform) var ____p = { x:CGPointMake(origin.x, origin.y).x * transform.a + CGPointMake(origin.x, origin.y).y * transform.c + transform.tx, y:CGPointMake(origin.x, origin.y).x * transform.b + CGPointMake(origin.x, origin.y).y * transform.d + transform.ty }; else var ____p = { x:origin.x, y:origin.y }; _DOMElement.style.left = ROUND(____p.x) + "px";_DOMElement.style.top = ROUND(____p.y) + "px";; | |
| } | |
| },["void","CGPoint"]), new objj_method(sel_getUid("setFrameSize:"), function $CPView__setFrameSize_(self, _cmd, aSize) | |
| { with(self) | |
| { | |
| var size = _frame.size; | |
| if (!aSize || (size.width == aSize.width && size.height == aSize.height)) | |
| return; | |
| var oldSize = { width:size.width, height:size.height }; | |
| size.width = aSize.width; | |
| size.height = aSize.height; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment