Skip to content

Commit

Permalink
Merge pull request shipshapecode#205 from HubSpot/dont-round-position
Browse files Browse the repository at this point in the history
Don't round position in transform
  • Loading branch information
TrevorBurnham authored Aug 31, 2016
2 parents 66e3701 + 7134921 commit 3e1e07b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tether",
"version": "1.3.4",
"version": "1.3.5",
"homepage": "http://github.hubspot.com/tether",
"authors": [
"Zack Bloom <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tether",
"repo": "HubSpot/tether",
"version": "1.3.4",
"version": "1.3.5",
"description": "A client-side library to make absolutely positioned elements attach to elements in the page efficiently.",
"authors": [
"Zack Bloom <[email protected]>",
Expand Down
8 changes: 4 additions & 4 deletions dist/js/tether.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! tether 1.3.4 */
/*! tether 1.3.5 */

(function(root, factory) {
if (typeof define === 'function' && define.amd) {
Expand Down Expand Up @@ -1055,12 +1055,12 @@ var TetherClass = (function (_Evented) {
var win = doc.defaultView;

var scrollbarSize = undefined;
if (doc.body.scrollWidth > win.innerWidth) {
if (win.innerHeight > doc.documentElement.clientHeight) {
scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);
next.viewport.bottom -= scrollbarSize.height;
}

if (doc.body.scrollHeight > win.innerHeight) {
if (win.innerWidth > doc.documentElement.clientWidth) {
scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);
next.viewport.right -= scrollbarSize.width;
}
Expand Down Expand Up @@ -1181,7 +1181,7 @@ var TetherClass = (function (_Evented) {
xPos = -_pos.right;
}

css[transformKey] = 'translateX(' + Math.round(xPos) + 'px) translateY(' + Math.round(yPos) + 'px)';
css[transformKey] = 'translateX(' + xPos + 'px) translateY(' + yPos + 'px)';

if (transformKey !== 'msTransform') {
// The Z transform will keep this in the GPU (faster, and prevents artifacts),
Expand Down
2 changes: 1 addition & 1 deletion dist/js/tether.min.js

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": "tether",
"version": "1.3.4",
"version": "1.3.5",
"description": "A client-side library to make absolutely positioned elements attach to elements in the page efficiently.",
"authors": [
"Zack Bloom <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src/js/tether.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ class TetherClass extends Evented {
xPos = -_pos.right;
}

css[transformKey] = `translateX(${ Math.round(xPos) }px) translateY(${ Math.round(yPos) }px)`;
css[transformKey] = `translateX(${ xPos }px) translateY(${ yPos }px)`;

if (transformKey !== 'msTransform') {
// The Z transform will keep this in the GPU (faster, and prevents artifacts),
Expand Down

0 comments on commit 3e1e07b

Please sign in to comment.