fix transform handles regression (#2018)
This commit is contained in:
parent
950bcd0b72
commit
964746e569
@ -79,7 +79,7 @@ export const getTransformHandlesFromCoords = (
|
|||||||
[x1, y1, x2, y2]: Bounds,
|
[x1, y1, x2, y2]: Bounds,
|
||||||
angle: number,
|
angle: number,
|
||||||
zoom: number,
|
zoom: number,
|
||||||
pointerType: PointerType = "touch",
|
pointerType: PointerType = "mouse",
|
||||||
omitSides: { [T in TransformHandleType]?: boolean } = {},
|
omitSides: { [T in TransformHandleType]?: boolean } = {},
|
||||||
): TransformHandles => {
|
): TransformHandles => {
|
||||||
const size = transformHandleSizes[pointerType];
|
const size = transformHandleSizes[pointerType];
|
||||||
@ -96,7 +96,7 @@ export const getTransformHandlesFromCoords = (
|
|||||||
|
|
||||||
const dashedLineMargin = 4 / zoom;
|
const dashedLineMargin = 4 / zoom;
|
||||||
|
|
||||||
const centeringOffset = 0;
|
const centeringOffset = (size - 8) / (2 * zoom);
|
||||||
|
|
||||||
const transformHandles: TransformHandles = {
|
const transformHandles: TransformHandles = {
|
||||||
nw: omitSides["nw"]
|
nw: omitSides["nw"]
|
||||||
@ -217,7 +217,7 @@ export const getTransformHandlesFromCoords = (
|
|||||||
export const getTransformHandles = (
|
export const getTransformHandles = (
|
||||||
element: ExcalidrawElement,
|
element: ExcalidrawElement,
|
||||||
zoom: number,
|
zoom: number,
|
||||||
pointerType: PointerType = "touch",
|
pointerType: PointerType = "mouse",
|
||||||
): TransformHandles => {
|
): TransformHandles => {
|
||||||
let omitSides: { [T in TransformHandleType]?: boolean } = {};
|
let omitSides: { [T in TransformHandleType]?: boolean } = {};
|
||||||
if (
|
if (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user