parametrized preserveAspectRatio
diff --git a/player/js/renderers/SVGRenderer.js b/player/js/renderers/SVGRenderer.js
index 105ce69..1110e7e 100644
--- a/player/js/renderers/SVGRenderer.js
+++ b/player/js/renderers/SVGRenderer.js
@@ -1,10 +1,13 @@
-function SVGRenderer(animationItem){
+function SVGRenderer(animationItem, config){
this.animationItem = animationItem;
this.layers = null;
this.renderedFrame = -1;
this.globalData = {
frameNum: -1
};
+ this.renderConfig = {
+ preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet'
+ };
this.elements = [];
this.destroyed = false;
}
@@ -121,7 +124,7 @@
this.animationItem.container.setAttribute('width',animData.w);
this.animationItem.container.setAttribute('height',animData.h);
this.animationItem.container.setAttribute('viewBox','0 0 '+animData.w+' '+animData.h);
- this.animationItem.container.setAttribute('preserveAspectRatio','xMidYMid meet');
+ this.animationItem.container.setAttribute('preserveAspectRatio',this.renderConfig.preserveAspectRatio);
this.animationItem.container.style.width = '100%';
this.animationItem.container.style.height = '100%';
this.animationItem.container.style.transform = 'translate3d(0,0,0)';