Function: getBoundedOffsets()
getBoundedOffsets(
newOffsets,frameData,imageData,mustCover?,mustContain?):object
Bounds the offsets for an image to the box, preventing the user from moving the image in a way that wouldn't be intended.
Parameters
newOffsets
FrameOffsets
The new intended offsets for the image.
frameData
FrameData
The current frame information
imageData
PatternImageData
mustCover?
boolean
When true the image sgould be bounded in such a way that it covers the entire frame at all times.
mustContain?
boolean
When true the image should be bounded in such a way that it is fully visible within the frame at all times. Ignored if mustCover is set.
Returns
object
regionIndex?
optionalregionIndex?:string
rotation?
optionalrotation?:number
x
x:
number
y
y:
number
zoom
zoom:
number