Creating a text near the center of a shape should put it in the center (#270)

* Snap to element center

* Fixed typo

* Added comment

* Reduced threshold to 30

* Skip snapping if alt key is pressed

* Fixed creating text with shape tool
This commit is contained in:
Timur Khazamov 2020-01-09 01:09:09 +05:00 committed by GitHub
parent 068dca604f
commit 1739540f00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 90 additions and 12 deletions

View file

@ -138,7 +138,6 @@ export function renderElement(
context.fillStyle = fillStyle;
context.font = font;
context.globalAlpha = 1;
console.log(element);
} else {
throw new Error("Unimplemented type " + element.type);
}