diff --git a/src/toastify.js b/src/toastify.js index d68cdad..2d36eb4 100644 --- a/src/toastify.js +++ b/src/toastify.js @@ -243,8 +243,8 @@ var x = getAxisOffsetAValue("x", this.options); var y = getAxisOffsetAValue("y", this.options); - var xOffset = this.options.position == "left" ? x : "-" + x; - var yOffset = this.options.gravity == "toastify-top" ? y : "-" + y; + var xOffset = this.options.position == "left" ? x : x > 0 ? "-" + x : x; + var yOffset = this.options.gravity == "toastify-top" ? y : y > 0 ? "-" + y : y; divElement.style.transform = "translate(" + xOffset + "," + yOffset + ")";