Declaration

func updateViewport(toScale targetScale: CGFloat, origin targetOrigin: NSPoint)

Declaration

- (void) updateViewportToScale:(CGFloat) targetScale origin:(NSPoint) targetOrigin;

Declaration

updateViewportToScale_origin_(targetScale: float, targetOrigin: NSPoint)

Parameters

targetScale

The desired scale. CGFLOAT_MAX when the scale should not be changed.

targetOrigin

The desired origin as returned by -scrollPointFromPoint:toReferencePoint:. Use an x coordinate of CGFLOAT_MAX when the origin should not be changed.

Discussion

Animates to the new scale and/or origin when enclosed in a NSAnimationContext with implicit animations enabled.

The animation duration will be no longer than the duration of the animation context. However, the effective animation duration might be shorter to compensate for minor visual adjustments.

Existing animations will be modified to retarget the new scale and/or origin.