Skip to content

Commit

Permalink
v0.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
FezVrasta committed Apr 6, 2016
1 parent 77677f0 commit 806ec0b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## v0.2.5-dev
## v0.2.5

- round top and left coordinates to prevent blur effect;
- 77677f0: round top and left coordinates to prevent blur effect;

## v0.2.4

Expand Down
12 changes: 8 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.2.4
* @version 0.2.5
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
Expand Down Expand Up @@ -230,18 +230,22 @@
position: data.offsets.popper.position
};

// round top and left to avoid blurry text
var left = Math.round(data.offsets.popper.left);
var top = Math.round(data.offsets.popper.top);

// if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
// we automatically use the supported prefixed version if needed
var prefixedProperty;
if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
styles[prefixedProperty] = 'translate3d(' + data.offsets.popper.left + 'px, ' + data.offsets.popper.top + 'px, 0)';
styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
styles.top = 0;
styles.left = 0;
}
// othwerise, we use the standard `left` and `top` properties
else {
styles.left = data.offsets.popper.left;
styles.top = data.offsets.popper.top;
styles.left =left;
styles.top = top;
}

setStyle(this._popper, styles);
Expand Down

0 comments on commit 806ec0b

Please sign in to comment.