From 25b233a88ecc87159f00d3b25bddcf556f15f8cc Mon Sep 17 00:00:00 2001 From: Manan Jadhav Date: Tue, 22 Dec 2020 13:26:44 -0500 Subject: [PATCH 1/2] don't add x, y, width, height to filter elems --- player/js/elements/svgElements/SVGEffects.js | 2 +- player/js/utils/filters.js | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/player/js/elements/svgElements/SVGEffects.js b/player/js/elements/svgElements/SVGEffects.js index b57ed0679..03489e3e8 100644 --- a/player/js/elements/svgElements/SVGEffects.js +++ b/player/js/elements/svgElements/SVGEffects.js @@ -1,7 +1,7 @@ function SVGEffects(elem){ var i, 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; diff --git a/player/js/utils/filters.js b/player/js/utils/filters.js index 12c809711..6b739cb3d 100644 --- a/player/js/utils/filters.js +++ b/player/js/utils/filters.js @@ -3,14 +3,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%'); + fil.setAttribute('id',filId); + 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; } From 3a35a1ca709ecf6e95dea2171e7d123321ce8405 Mon Sep 17 00:00:00 2001 From: Manan Jadhav Date: Tue, 16 Feb 2021 03:35:09 -0500 Subject: [PATCH 2/2] fix cs --- player/js/utils/filters.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/player/js/utils/filters.js b/player/js/utils/filters.js index 1ce3eb720..e969d225e 100644 --- a/player/js/utils/filters.js +++ b/player/js/utils/filters.js @@ -6,10 +6,10 @@ var filtersFactory = (function () { ob.createFilter = createFilter; ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter; - function createFilter(filId, skipCoordinates){ + function createFilter(filId, skipCoordinates) { var fil = createNS('filter'); fil.setAttribute('id', filId); - if (skipCoordinates != true) { + if (skipCoordinates !== true) { fil.setAttribute('filterUnits', 'objectBoundingBox'); fil.setAttribute('x', '0%'); fil.setAttribute('y', '0%');