Resizable

Moveable. Resizable

Methods

request(eopt, e.directionopt, e.deltaWidthopt, e.deltaHeightopt, e.isInstantopt) → {Moveable.Requester}

Source:
Name Type Description
e? object the Resizable's request parameter
Properties
Name Type Default Description
direction? number [1, 1] Direction to resize
deltaWidth? number delta number of width
deltaHeight? number delta number of height
isInstant? number Whether to execute the request instantly
Example
// Instantly Request (requestStart - request - requestEnd)
// Use Relative Value
moveable.request("resizable", { deltaWidth: 10, deltaHeight: 10, isInstant: true });

// Use Absolute Value
moveable.request("resizable", { offsetWidth: 100, offsetHeight: 100, isInstant: true });

// requestStart
const requester = moveable.request("resizable");

// request
// Use Relative Value
requester.request({ deltaWidth: 10, deltaHeight: 10 });
requester.request({ deltaWidth: 10, deltaHeight: 10 });
requester.request({ deltaWidth: 10, deltaHeight: 10 });

// Use Absolute Value
moveable.request("resizable", { offsetWidth: 100, offsetHeight: 100, isInstant: true });
moveable.request("resizable", { offsetWidth: 110, offsetHeight: 100, isInstant: true });
moveable.request("resizable", { offsetWidth: 120, offsetHeight: 100, isInstant: true });

// requestEnd
requester.requestEnd();
Returns:
Moveable Requester
Type
Moveable.Requester