Skip to content

Commit

Permalink
Merge branch 'master' of github.com:airbnb/lottie-web
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymovin committed Mar 21, 2021
2 parents 9d0965f + 1067722 commit b4588b2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion player/js/elements/svgElements/SVGEffects.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function SVGEffects(elem) {
var i;
var len = elem.data.ef ? elem.data.ef.length : 0;
var filId = createElementID();
var fil = filtersFactory.createFilter(filId);
var fil = filtersFactory.createFilter(filId, true);
var count = 0;
this.filters = [];
var filterManager;
Expand Down
14 changes: 8 additions & 6 deletions player/js/utils/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ var filtersFactory = (function () {
ob.createFilter = createFilter;
ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;

function createFilter(filId) {
function createFilter(filId, skipCoordinates) {
var fil = createNS('filter');
fil.setAttribute('id', filId);
fil.setAttribute('filterUnits', 'objectBoundingBox');
fil.setAttribute('x', '0%');
fil.setAttribute('y', '0%');
fil.setAttribute('width', '100%');
fil.setAttribute('height', '100%');
if (skipCoordinates !== true) {
fil.setAttribute('filterUnits', 'objectBoundingBox');
fil.setAttribute('x', '0%');
fil.setAttribute('y', '0%');
fil.setAttribute('width', '100%');
fil.setAttribute('height', '100%');
}
return fil;
}

Expand Down

0 comments on commit b4588b2

Please sign in to comment.