mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-22 04:11:52 +00:00
Update shadow.class.js
This commit is contained in:
parent
411c8b446a
commit
a79177e05b
1 changed files with 3 additions and 3 deletions
|
|
@ -113,13 +113,13 @@
|
|||
toSVG: function(object) {
|
||||
var fBoxX = 40, fBoxY = 40, NUM_FRACTION_DIGITS = fabric.Object.NUM_FRACTION_DIGITS,
|
||||
offset = fabric.util.rotateVector({x: this.offsetX, y: this.offsetY},
|
||||
fabric.util.degreesToRadians(-object.angle));
|
||||
fabric.util.degreesToRadians(-object.angle)), BLUR_BOX = 20;
|
||||
|
||||
if (object.width && object.height) {
|
||||
//http://www.w3.org/TR/SVG/filters.html#FilterEffectsRegion
|
||||
// we add some extra space to filter box to contain the blur ( 20 )
|
||||
fBoxX = toFixed((Math.abs(offset.x) + this.blur) / object.width, NUM_FRACTION_DIGITS) * 100 + 20;
|
||||
fBoxY = toFixed((Math.abs(offset.y) + this.blur) / object.height, NUM_FRACTION_DIGITS) * 100 + 20;
|
||||
fBoxX = toFixed((Math.abs(offset.x) + this.blur) / object.width, NUM_FRACTION_DIGITS) * 100 + BLUR_BOX;
|
||||
fBoxY = toFixed((Math.abs(offset.y) + this.blur) / object.height, NUM_FRACTION_DIGITS) * 100 + BLUR_BOX;
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Reference in a new issue