-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Valen. H edited this page Jan 1, 2019
·
2 revisions
A web module that adds controls to the canvas object
var cc = new CanvasControls.CanvasControls.ControllableCanvas({ //Lib.Namespace.Class
dragEnabled: true,
target: canvas //grabs first occurence if not passed
});
cc.handle(); //attach handles, can only be called once, to attach handles afterwards, use: cc._pcAdapt() or cc.mobileAdapt() after enabling them.
/**
* Voila! Try dragging the canvas!! You can add drag bounds by setting the transBounds[x, y, X, Y] array
*/
Made by Valen.H. in Greece with love :P
Third-Party modules used:
Typescript / Babel / Webpack