mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-21 20:01:52 +00:00
Remove polygon offsetting fix which broke some SVG shapes
This commit is contained in:
parent
ed0716718a
commit
776d966bdb
4 changed files with 14 additions and 14 deletions
12
dist/all.js
vendored
12
dist/all.js
vendored
|
|
@ -12270,14 +12270,14 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @scope fabric.Stati
|
|||
this.width = (maxX - minX) || 1;
|
||||
this.height = (maxY - minY) || 1;
|
||||
|
||||
var halfWidth = this.width / 2,
|
||||
halfHeight = this.height / 2;
|
||||
// var halfWidth = this.width / 2,
|
||||
// halfHeight = this.height / 2;
|
||||
|
||||
// change points to offset polygon into a bounding box
|
||||
this.points.forEach(function(p) {
|
||||
p.x -= halfWidth;
|
||||
p.y -= halfHeight;
|
||||
}, this);
|
||||
// this.points.forEach(function(p) {
|
||||
// p.x -= halfWidth;
|
||||
// p.y -= halfHeight;
|
||||
// }, this);
|
||||
|
||||
this.minX = minX;
|
||||
this.minY = minY;
|
||||
|
|
|
|||
4
dist/all.min.js
vendored
4
dist/all.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/all.min.js.gz
vendored
BIN
dist/all.min.js.gz
vendored
Binary file not shown.
|
|
@ -56,14 +56,14 @@
|
|||
this.width = (maxX - minX) || 1;
|
||||
this.height = (maxY - minY) || 1;
|
||||
|
||||
var halfWidth = this.width / 2,
|
||||
halfHeight = this.height / 2;
|
||||
// var halfWidth = this.width / 2,
|
||||
// halfHeight = this.height / 2;
|
||||
|
||||
// change points to offset polygon into a bounding box
|
||||
this.points.forEach(function(p) {
|
||||
p.x -= halfWidth;
|
||||
p.y -= halfHeight;
|
||||
}, this);
|
||||
// this.points.forEach(function(p) {
|
||||
// p.x -= halfWidth;
|
||||
// p.y -= halfHeight;
|
||||
// }, this);
|
||||
|
||||
this.minX = minX;
|
||||
this.minY = minY;
|
||||
|
|
|
|||
Loading…
Reference in a new issue