A non-transitory computer-readable storage medium having stored therein instructions, which when executed by a device, cause the device to perform a method comprising:
- detecting a sequence of inputs that includes:
- detecting a first input at a first position that corresponds to a respective portion of a user interface object displayed within a user interface on a display followed by detecting movement of the first contact away from the first position;
- and
- detecting a second input at a second position that is different from the first position;
- in response to detecting the sequence of inputs:
- in accordance with a determination that the movement of the first input away from the first position includes less than a threshold amount of movement away from the first position during a predetermined temporal threshold, performing a scaling operation based on the sequence of inputs based on a scaling center and a distance between the first position and the second position, wherein:
- in accordance with a determination that the respective portion of the user interface object is a first portion of the user interface object, the scaling center is selected to be at a first location within the first portion of the user interface object,
- in accordance with a determination that the respective portion of the user interface object is a second portion of the user interface object, different from the first portion of the user interface object, the scaling center is selected to be at a second location within the second portion of the user interface object, wherein the second location is different from the first location, and
- performing the scaling operation comprises:
- in accordance with a determination that a relative location of the second position with respect to the first position satisfies a first scaling direction criterion based on whether a component of a direction from the first position to the second position is positive or negative with respect to an axis, zooming into the user interface object on the display based on the distance between the first position and the second position while a portion of the user interface object on the display corresponding to the scaling center remains fixed relative to the display;
- and
- in accordance with a determination that the relative location of the second position with respect to the first position satisfies a second scaling direction criterion, different from the first scaling direction criterion, based on whether the component of the direction from the first position to the second position is positive or negative with respect to the axis, zooming out of the user interface object on the display based on the distance between the first position and the second position while the portion of the user interface object on the display corresponding to the scaling center remains fixed relative to the display;
- and
- in accordance with a determination that the movement of the first input away from the first position includes more than the threshold amount of movement away from the first position during the predetermined temporal threshold, performing a drag operation based on the sequence of inputs.