FEATURE: add support for fluid ad size in Google Ad Manager
No width or height will be set on containers when ad size is fluid.
This commit is contained in:
@@ -126,6 +126,10 @@ function getWidthAndHeight(placement, settings, isMobile) {
|
||||
renderCounts[placement] += 1;
|
||||
}
|
||||
|
||||
if (size === "fluid") {
|
||||
return { width: 'fluid', height: 'fluid' };
|
||||
}
|
||||
|
||||
const sizeObj = {
|
||||
width: parseInt(splitWidthInt(size), 10),
|
||||
height: parseInt(splitHeightInt(size), 10)
|
||||
@@ -281,12 +285,16 @@ export default AdComponent.extend({
|
||||
|
||||
@computed("width", "height")
|
||||
adWrapperStyle(w, h) {
|
||||
return `width: ${w}px; height: ${h}px;`.htmlSafe();
|
||||
if (w !== 'fluid') {
|
||||
return `width: ${w}px; height: ${h}px;`.htmlSafe();
|
||||
}
|
||||
},
|
||||
|
||||
@computed("width")
|
||||
adTitleStyleMobile(w) {
|
||||
return `width: ${w}px;`.htmlSafe();
|
||||
if (w !== 'fluid') {
|
||||
return `width: ${w}px;`.htmlSafe();
|
||||
}
|
||||
},
|
||||
|
||||
@computed(
|
||||
|
||||
Reference in New Issue
Block a user