Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 938 Bytes

README.md

File metadata and controls

40 lines (32 loc) · 938 Bytes

#free transform tool for createjs canvas library this tool has the follwing features:

  • moveTool
  • scaleTool
  • hScaleTool
  • vScaleTool
  • rotateTool

in order to use this tool you have to do the following:

1- add a new layer to your stage in top of everything as the follwing:

  var top = new createjs.Container();
  top.name = "top";
  stage.addChild(top);

2- add the transform tool inside the top layer as the follwing:

 var selectTool = new createjs.util.FreeTranformTool();
 selectTool.name = "transform";
 top.addChild(selectTool);

3- to select any object for example when the user click on that object as the following:

 object.addEventListener("click", function (evt) {
      selectTool.select(evt.currentTarget,stage);
  });

4- to unselect object for example when the user click on the stage as the following:

stage.addEventListener("click", function () {
    selectTool.unselect();
});