Skip to content

Commit

Permalink
[ISSUE-98] added px to div style in constructMarkup (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
arneschulz1984 authored Dec 9, 2020
1 parent f062693 commit 6d83c6b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/renderingManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ const DEFAULT_CACHE_HOST = 'prebid.adnxs.com';
const DEFAULT_CACHE_PATH = '/pbc/v1/cache';

/**
*
*
* @param {Object} win Window object
* @param {Object} environment Environment object
* @returns {Object}
* @returns {Object}
*/
export function newRenderingManager(win, environment) {
/**
Expand All @@ -28,7 +28,7 @@ export function newRenderingManager(win, environment) {
*/
let renderAd = function(doc, dataObject) {
const targetingData = utils.transformAuctionTargetingData(dataObject);

if (environment.isMobileApp(targetingData.env)) {
renderAmpOrMobileAd(targetingData.cacheHost, targetingData.cachePath, targetingData.uuid, targetingData.size, targetingData.hbPb, true);
} else if (environment.isAmp(targetingData.uuid)) {
Expand Down Expand Up @@ -223,7 +223,7 @@ export function newRenderingManager(win, environment) {

/**
* Load response from localStorage. In case of MoPub, sdk caches response
* @param {string} cacheId
* @param {string} cacheId
*/
function loadFromLocalCache(cacheId) {
let bid = win.localStorage.getItem(cacheId);
Expand All @@ -233,7 +233,7 @@ export function newRenderingManager(win, environment) {

/**
* Parse response
* @param {string} response
* @param {string} response
* @returns {Object} bidObject parsed response
*/
function parseResponse(response) {
Expand All @@ -256,7 +256,7 @@ export function newRenderingManager(win, environment) {
function constructMarkup(ad, width, height) {
let id = utils.getUUID();
return `<div id="${id}" style="border-style: none; position: absolute; width:100%; height:100%;">
<div id="${id}_inner" style="margin: 0 auto; width:${width}; height:${height}; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);">${ad}</div>
<div id="${id}_inner" style="margin: 0 auto; width:${width}px; height:${height}px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);">${ad}</div>
</div>`;
}

Expand Down

0 comments on commit 6d83c6b

Please # to comment.