Skip to content

Commit

Permalink
build and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
catc committed Jun 18, 2019
1 parent 2df8fff commit a82f1f5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
27 changes: 15 additions & 12 deletions dist/displace.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* displacejs.js 1.3.1 - Tiny javascript library to create moveable DOM elements.
* displacejs.js 1.3.2 - Tiny javascript library to create moveable DOM elements.
* Copyright (c) 2019 Catalin Covic - https://github.com/catc/displace
* License: MIT
*/
Expand Down Expand Up @@ -289,20 +289,23 @@ return /******/ (function(modules) { // webpackBootstrap
}
}

var el = this.el;
var events = this.events;
// only left button is clicked
if (e.button === 0) {
var el = this.el;
var events = this.events;

if (typeof opts.onMouseDown === 'function') {
opts.onMouseDown(el, e);
}
if (typeof opts.onMouseDown === 'function') {
opts.onMouseDown(el, e);
}

// determine initial offset and bind to mousemove handler
var wOff = e.clientX - el.offsetLeft;
var hOff = e.clientY - el.offsetTop;
events.mousemove = mousemove.bind(this, wOff, hOff);
// determine initial offset and bind to mousemove handler
var wOff = e.clientX - el.offsetLeft;
var hOff = e.clientY - el.offsetTop;
events.mousemove = mousemove.bind(this, wOff, hOff);

document.addEventListener('mousemove', events.mousemove, false);
document.addEventListener('mouseup', events.mouseup, false);
document.addEventListener('mousemove', events.mousemove, false);
document.addEventListener('mouseup', events.mouseup, false);
}
};

function mousemove(offsetW, offsetH, e) {
Expand Down
4 changes: 2 additions & 2 deletions dist/displace.min.js

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

6 changes: 3 additions & 3 deletions docs/bundle.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": "displacejs",
"version": "1.3.1",
"version": "1.3.2",
"description": "Tiny javascript library to create moveable DOM elements.",
"main": "dist/displace.min.js",
"scripts": {
Expand Down

0 comments on commit a82f1f5

Please sign in to comment.