Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
Transformation for default mouse movement faulty due to a typo.
  • Loading branch information
terrymun committed May 20, 2015
1 parent 1ce8b93 commit 8801d04
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,4 @@ Since Paver is provided as-is and free-of-charge, I am sorry to inform you that
| 1.0.0 | May 14, 2015 | Official release |
| 1.1.0 | May 16, 2015 | <p>**Code optimization**: Stored global variables and checks within the `global` variable, removed the need to pass them to individual plugin instances.</p><p>**Bug fix**:</p><ul><li>Minor fix for setTimeout and clearTimeout for scroller persistence</li><li>Added missing module of handling responsiveness of panorama when viewport is too wide</li></ul> |
| 1.2.0 | May 19, 2015 | <p>**Better demo pages**: Demo pages have been restyled (slightly) and with navigation added.</p><p>**Feature addition**: Now you can [declare custom smoothing functions](http://terrymun.github.io/paver/demo/usage-notes.html#custom-smoothing-function). Appropriate documentations have been added/updated to reflec this new feature&mdash;and the smoothing functions documentation now comes with beautiful [d3.js](http://d3js.org/) powered graphs, and [MathJax](https://www.mathjax.org/) powered equations.</p> |
| 1.2.1 | | <p>**Bug fix**: Last known panned position not recorded properly.</p>
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "paver",
"version": "1.2.0",
"version": "1.2.1",
"description": "A minimal panorama/image viewer replicating the effect seen in Facebook Pages app.",
"homepage": "https://github.com/terrymun/paver",
"main": [
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "paver",
"repo": "terrymun/paver",
"description": "A minimal panorama/image viewer replicating the effect seen in Facebook Pages app.",
"version": "1.2.0",
"version": "1.2.1",
"scripts": [
"./jquery.paver.js",
"./jqueyr.paver.min.js"
Expand Down
9 changes: 5 additions & 4 deletions jquery.paver.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Paver
// Description: A minimal panorama/image viewer replicating the effect seen in Facebook Pages app
// Version: 1.2.0
// Version: 1.2.1
// Author: Terry Mun
// Author URI: http://terrymun.com
;(function ( $, window, document, undefined ) {
Expand Down Expand Up @@ -248,6 +248,7 @@

// Check overflow
if(_fun.checkOverflow(this)) {
console.log(paver.instanceData.lastPanX)
// Pan to last known position
paver.pan({
xPos: Math.min(paver.instanceData.lastPanX,1),
Expand Down Expand Up @@ -328,8 +329,8 @@

// Update counter and last panned position
paver.instanceData.panCounter += 1;
paver.instanceData.lastPanX = parseInt(rX);
paver.instanceData.lastPanY = parseInt(rY);
paver.instanceData.lastPanX = rX;
paver.instanceData.lastPanY = rY;
}
});

Expand Down Expand Up @@ -684,7 +685,7 @@

// Set transform
paver.pan({
xPos: smooth(deltaX, thresholdY),
xPos: smooth(deltaX, thresholdX),
yPos: smooth(deltaY, thresholdY)
});
}
Expand Down
2 changes: 1 addition & 1 deletion jquery.paver.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,7 +1,7 @@
{
"name": "paver",
"filename": "jquery.paver.min.js",
"version": "1.2.0",
"version": "1.2.1",
"description": "A minimal panorama/image viewer replicating the effect seen in Facebook Pages app.",
"homepage": "https://github.com/terrymun/paver",
"main": "jquery.paver.js",
Expand Down
9 changes: 5 additions & 4 deletions src/jquery.paver.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Paver
// Description: A minimal panorama/image viewer replicating the effect seen in Facebook Pages app
// Version: 1.2.0
// Version: 1.2.1
// Author: Terry Mun
// Author URI: http://terrymun.com
;(function ( $, window, document, undefined ) {
Expand Down Expand Up @@ -248,6 +248,7 @@

// Check overflow
if(_fun.checkOverflow(this)) {
console.log(paver.instanceData.lastPanX)
// Pan to last known position
paver.pan({
xPos: Math.min(paver.instanceData.lastPanX,1),
Expand Down Expand Up @@ -328,8 +329,8 @@

// Update counter and last panned position
paver.instanceData.panCounter += 1;
paver.instanceData.lastPanX = parseInt(rX);
paver.instanceData.lastPanY = parseInt(rY);
paver.instanceData.lastPanX = rX;
paver.instanceData.lastPanY = rY;
}
});

Expand Down Expand Up @@ -684,7 +685,7 @@

// Set transform
paver.pan({
xPos: smooth(deltaX, thresholdY),
xPos: smooth(deltaX, thresholdX),
yPos: smooth(deltaY, thresholdY)
});
}
Expand Down

0 comments on commit 8801d04

Please sign in to comment.