Skip to content

Commit

Permalink
fix(OffCanvas): some tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
BowlingX committed Mar 7, 2016
1 parent 89dff43 commit 7c129eb
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 37 deletions.
11 changes: 2 additions & 9 deletions build/js/flexcss.js

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

6 changes: 3 additions & 3 deletions build/js/flexcss.min.js

Large diffs are not rendered by default.

10 changes: 1 addition & 9 deletions build/js/modal.js

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

2 changes: 1 addition & 1 deletion build/js/modal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/maps/flexcss.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/maps/flexcss.min.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/maps/form.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/maps/form.min.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/maps/modal.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/maps/modal.min.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/main/OffCanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class OffCanvas {
const bounds = target.getBoundingClientRect();
const compare = factor > 0 ? calcX <= 0 : calcX >= 0;
if (compare) {
e.preventDefault();
style.transition = 'transform 0s ease';
style.webkitTransition = '-webkit-transform 0s ease';
target.mustHide = factor > 0 ? calcX * -1 >
Expand Down
14 changes: 5 additions & 9 deletions src/main/lib/FixedWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,11 @@ export default class FixedWindow {
return false;
}

if (!shouldNotMoveDown && isScrollingDown) {
e.stopImmediatePropagation();
}

if (shouldNotMoveDown && !isScrollingDown) {
e.stopImmediatePropagation();
}

if (!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) {
if ((!shouldNotMoveDown && isScrollingDown) ||
(shouldNotMoveDown && !isScrollingDown) ||
(!shouldNotMoveDown && !shouldNotMoveUp && !isScrollingDown) ||
(shouldNotMoveDown && shouldNotMoveUp && isScrollingDown)
) {
e.stopImmediatePropagation();
}

Expand Down

0 comments on commit 7c129eb

Please sign in to comment.