Skip to content

Commit

Permalink
v0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
FezVrasta committed Apr 11, 2016
1 parent b0d77ff commit 90fa8d2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.3.1

- b0d77ff: don't apply x-placement attr if applyStyles modifier is disabled

## v0.3.0

- 5521b0d: added support for integration with React.js and Ember.js.
Expand Down
10 changes: 6 additions & 4 deletions build/popper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 0.3.0
* @version 0.3.1
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
Expand Down Expand Up @@ -139,9 +139,9 @@

// if the popper variable is a configuration object, parse it to generate an HTMLElement
// generate a default popper if is not defined
var isNotDefined = popper === undefined || popper === null;
var isNotDefined = typeof popper === 'undefined' || popper === null;
var isConfig = popper && popper.constructor.name === 'Object';
if ( isNotDefined || isConfig) {
if (isNotDefined || isConfig) {
this._popper = this.parse(isConfig ? popper : {});
}
// otherwise, use the given HTMLElement as popper
Expand All @@ -167,7 +167,9 @@

// set the x-placement attribute before everything else because it could be used to add margins to the popper
// margins needs to be calculated to get the correct popper offsets
this._popper.setAttribute('x-placement', this._options.placement);
if (this._options.modifiers.indexOf('applyStyle') !== -1) {
this._popper.setAttribute('x-placement', this._options.placement);
}

// fire the first update to position the popper in the right place
this.update();
Expand Down
4 changes: 2 additions & 2 deletions build/popper.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/popper.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "popper.js",
"version": "0.3.0",
"version": "0.3.1",
"description": "",
"main": "src/popper.js",
"scripts": {
Expand Down

0 comments on commit 90fa8d2

Please sign in to comment.