Skip to content

Commit

Permalink
Fix transform and camera issue (#12)
Browse files Browse the repository at this point in the history
* Change setTransform to transform in TRANSFORM object to not conflict with camera's behavior

* Update dependencies
  • Loading branch information
lukix authored Jan 1, 2021
1 parent 929c50b commit 48215ae
Show file tree
Hide file tree
Showing 3 changed files with 258 additions and 393 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "declarative-canvas",
"version": "1.1.0",
"version": "1.1.1",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"author": "Łukasz Jenczmyk",
Expand Down Expand Up @@ -30,18 +30,18 @@
"build-storybook": "build-storybook -c .storybook -o out"
},
"devDependencies": {
"@storybook/html": "^6.1.2",
"@types/jest": "^26.0.15",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
"babel-loader": "^8.2.1",
"eslint": "7.14.0",
"@storybook/html": "^6.1.11",
"@types/jest": "^26.0.19",
"@typescript-eslint/eslint-plugin": "^4.11.1",
"@typescript-eslint/parser": "^4.11.1",
"babel-loader": "^8.2.2",
"eslint": "7.16.0",
"eslint-plugin-jest": "^24.1.3",
"husky": "4.3.0",
"husky": "4.3.6",
"jest": "^26.6.3",
"prettier": "1.19.1",
"ts-jest": "^26.4.4",
"typescript": "^4.1.2"
"typescript": "^4.1.3"
},
"husky": {
"hooks": {
Expand Down
2 changes: 1 addition & 1 deletion src/drawHandlerFunctions/drawTransform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const drawTransform = <T>(
},
drawObject: (props: GraphicalObject<T>) => void
): void => {
context.setTransform(scaleX, skewY, skewX, scaleY, dx, dy);
context.transform(scaleX, skewY, skewX, scaleY, dx, dy);
context.rotate(rotation);
children.forEach(childObject => {
drawObject(childObject);
Expand Down
Loading

0 comments on commit 48215ae

Please sign in to comment.