mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fix IO mask position slightly off in edit mode (#3121)
This commit is contained in:
parent
97efd49cd8
commit
642f29cf5e
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ export const addShape = (
|
||||||
boundingBox: fabric.Rect,
|
boundingBox: fabric.Rect,
|
||||||
shape: Shape,
|
shape: Shape,
|
||||||
): void => {
|
): void => {
|
||||||
const fabricShape = shape.toFabric(boundingBox.getBoundingRect());
|
const fabricShape = shape.toFabric(boundingBox.getBoundingRect(true));
|
||||||
addBorder(fabricShape);
|
addBorder(fabricShape);
|
||||||
if (fabricShape.type === "i-text") {
|
if (fabricShape.type === "i-text") {
|
||||||
enableUniformScaling(canvas, fabricShape);
|
enableUniformScaling(canvas, fabricShape);
|
||||||
|
@ -26,7 +26,7 @@ export const addShapeGroup = (
|
||||||
): void => {
|
): void => {
|
||||||
const group = new fabric.Group();
|
const group = new fabric.Group();
|
||||||
shapes.map((shape) => {
|
shapes.map((shape) => {
|
||||||
const fabricShape = shape.toFabric(boundingBox.getBoundingRect());
|
const fabricShape = shape.toFabric(boundingBox.getBoundingRect(true));
|
||||||
addBorder(fabricShape);
|
addBorder(fabricShape);
|
||||||
group.addWithUpdate(fabricShape);
|
group.addWithUpdate(fabricShape);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue