Skip to content

Instantly share code, notes, and snippets.

@toddfreese
Created January 18, 2012 21:17
Show Gist options
  • Select an option

  • Save toddfreese/1635709 to your computer and use it in GitHub Desktop.

Select an option

Save toddfreese/1635709 to your computer and use it in GitHub Desktop.
{
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