Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
joestrong committed Oct 22, 2015
2 parents 36b9d2f + 120a856 commit 1cc0a31
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/triangle-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function TriangleBackground(source, options) {
window.addEventListener('resize', this.resize.bind(this));

if(!options || options.mouseHoverHighlight !== false) {
this.containerElement.addEventListener('mousemove', this.mouseMove.bind(this));
window.addEventListener('mousemove', this.mouseMove.bind(this));
}
}

Expand Down Expand Up @@ -283,7 +283,7 @@ TriangleBackground.prototype.resize = function() {

TriangleBackground.prototype.mouseMove = function(event) {
if (this.nodeManager) {
this.nodeManager.setMousePosition(event.offsetX, event.offsetY);
this.nodeManager.setMousePosition(event.clientX, event.clientY);
}
};

Expand Down
2 changes: 1 addition & 1 deletion dist/triangle-background.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "triangle-background",
"version": "0.2.3",
"version": "0.2.4",
"description": "Creates a web page background of tesselating triangles with hover effect",
"main": "dist/triangle-background.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/triangle-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function TriangleBackground(source, options) {
window.addEventListener('resize', this.resize.bind(this));

if(!options || options.mouseHoverHighlight !== false) {
this.containerElement.addEventListener('mousemove', this.mouseMove.bind(this));
window.addEventListener('mousemove', this.mouseMove.bind(this));
}
}

Expand Down Expand Up @@ -60,7 +60,7 @@ TriangleBackground.prototype.resize = function() {

TriangleBackground.prototype.mouseMove = function(event) {
if (this.nodeManager) {
this.nodeManager.setMousePosition(event.offsetX, event.offsetY);
this.nodeManager.setMousePosition(event.clientX, event.clientY);
}
};

Expand Down

0 comments on commit 1cc0a31

Please sign in to comment.