90도 추가

This commit is contained in:
hyojun.choi 2024-08-06 13:37:33 +09:00
parent 2e5346a387
commit ec9ecbd7b3

View File

@ -34,7 +34,7 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, {
}
const nextPoint = points[(i + 1) % points.length]
const angle = calculateAngle(point, nextPoint)
if (!(Math.abs(angle) === 0 || Math.abs(angle) === 180)) {
if (!(Math.abs(angle) === 0 || Math.abs(angle) === 180 || Math.abs(angle) === 90)) {
isDiagonal = true
}
})