同步印花的缩放偏移显示
This commit is contained in:
@@ -439,16 +439,16 @@
|
||||
if (!obj.oldPattern) obj.oldPattern = obj.get("fill");
|
||||
const pattern = new fabric.Pattern({
|
||||
...obj.get("fill"),
|
||||
offsetX: (value.left / 100) * obj.width,
|
||||
offsetY: (value.top / 100) * obj.height,
|
||||
offsetX: value.x,
|
||||
offsetY: value.y,
|
||||
});
|
||||
obj.set("fill", pattern);
|
||||
props.canvas.renderAll();
|
||||
};
|
||||
const changeFillOffset = (value, obj) => {
|
||||
const pattern = new fabric.Pattern({
|
||||
offsetX: (value.left / 100) * obj.width,
|
||||
offsetY: (value.top / 100) * obj.height,
|
||||
offsetX: value.x,
|
||||
offsetY: value.y,
|
||||
});
|
||||
changeFill(obj, pattern);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user