Skip to content

Commit

Permalink
setCentering support
Browse files Browse the repository at this point in the history
  • Loading branch information
ogerman committed Apr 11, 2016
1 parent e07808a commit 9b74c8e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ Available Options
<td>disableInitialLoad</td>
<td>This allows for serving companion ad units when the video on the page auto plays. You'll need to include this setting with companionAds as true to avoid possible double impressions. (https://support.google.com/dfp_premium/answer/1191131)</td>
</tr>
<tr>
<td>setCentering</td>
<td>Enables/disables centering of ads.</td>
</tr>
<tr>
<td>afterEachAdLoaded</td>
<td>This is a call back function, see below for more information.</td>
Expand Down
6 changes: 6 additions & 0 deletions jquery.dfp.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
refreshExisting: true,
disablePublisherConsole: false,
disableInitialLoad: false,
setCentering: false,
noFetch: false,
namespace: undefined,
sizeMapping: {}
Expand Down Expand Up @@ -298,6 +299,11 @@
pubadsService.noFetch();
}


if (dfpOptions.setCentering) {
pubadsService.setCentering(true);
}

// Setup event listener to listen for renderEnded event and fire callbacks.
pubadsService.addEventListener('slotRenderEnded', function (event) {

Expand Down
4 changes: 2 additions & 2 deletions jquery.dfp.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9b74c8e

Please sign in to comment.