Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert and remove NEG VT updates #40

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

* remove console log ([34] (https://github.com/apartmenttherapy/react-gpt/pull/34))


<a name="2.1.7"></a>
## [2.1.7](https://github.com/apartmenttherapy/react-gpt/compare/v2.1.6...v2.1.7) (2023-03-03)

Expand All @@ -24,7 +23,6 @@

* negative viewable threshold update ([30] (https://github.com/apartmenttherapy/react-gpt/pull/30))


<a name="2.1.5"></a>
## [2.1.5](https://github.com/apartmenttherapy/react-gpt/compare/v2.1.4...v2.1.5) (2022-05-16)

Expand All @@ -33,8 +31,6 @@
<a name="2.1.4"></a>
## [2.1.4](https://github.com/apartmenttherapy/react-gpt/compare/v2.1.3...v2.1.4) (2022-05-03)



<a name="2.1.3"></a>
## [2.1.3](https://github.com/apartmenttherapy/react-gpt/compare/v2.1.2...v2.1.3) (2022-02-24)

Expand Down
15 changes: 2 additions & 13 deletions src/Bling.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,6 @@ class Bling extends React.Component {
* @property viewableThreshold
*/
viewableThreshold: PropTypes.number,
/**
* Skip isInViewport check if true.
*/
doNotUseViewableThreshold: PropTypes.bool,
/**
* An optional call back function to notify when the script is loaded.
*
Expand Down Expand Up @@ -262,10 +258,6 @@ class Bling extends React.Component {
* An optional flag to indicate whether an ad should only render when it's fully in the viewport area. Default is `true`.
*/
renderWhenViewable: true,
/**
* If true skip isInViewport check.
*/
doNotUseViewableThreshold: false,
/**
* An optional number to indicate how much percentage of an ad area needs to be in a viewable area before rendering. Default value is 0.5.
* Acceptable range is between 0 and 1.
Expand Down Expand Up @@ -664,14 +656,11 @@ class Bling extends React.Component {

notInViewport(props = this.props, state = this.state) {
const {inViewport} = state;
return (
this.getRenderWhenViewable(props) &&
(!props.doNotUseViewableThreshold && !inViewport)
);
return this.getRenderWhenViewable(props) && !inViewport;
}

defineSlot() {
const { adUnitPath, outOfPage, npa } = this.props;
const {adUnitPath, outOfPage, npa} = this.props;
const divId = this._divId;
const slotSize = this.getSlotSize();

Expand Down