adding comments about diamond dimensions

This commit is contained in:
Faustino Kialungila 2020-01-07 18:28:56 +01:00
parent 2fb5c4cd13
commit 0713d7db68

View file

@ -19,6 +19,8 @@ export function getElementAbsoluteY2(element: ExcalidrawElement) {
}
export function getDiamondPoints(element: ExcalidrawElement) {
// Here we add +1 to avoid these numbers to be 0
// otherwise rough.js will throw an error complaining about it
const topX = Math.floor(element.width / 2) + 1;
const topY = 0;
const rightX = element.width;