Code adjustments

This commit is contained in:
Tobias Reich 2014-10-18 18:13:45 +02:00
parent f882bac6f2
commit 6672f556e1
5 changed files with 36 additions and 36 deletions

BIN
dist/main.js vendored

Binary file not shown.

View File

@ -5,7 +5,7 @@
* @copyright 2014 by Tobias Reich * @copyright 2014 by Tobias Reich
*/ */
build = {}; build = {}
build.divider = function(title) { build.divider = function(title) {

View File

@ -5,7 +5,7 @@
* @copyright 2014 by Tobias Reich * @copyright 2014 by Tobias Reich
*/ */
multiselect = {}; multiselect = {}
multiselect.position = { multiselect.position = {

View File

@ -9,18 +9,20 @@ swipe = {
obj: null, obj: null,
tolerance: 150, tolerance: 150,
offset: 0, offset: 0
start: function(obj, tolerance) { }
swipe.start = function(obj, tolerance) {
if (obj) swipe.obj = obj; if (obj) swipe.obj = obj;
if (tolerance) swipe.tolerance = tolerance; if (tolerance) swipe.tolerance = tolerance;
return true; return true;
}, }
move: function(e) { swipe.move = function(e) {
if (swipe.obj===null) return false; if (swipe.obj===null) return false;
@ -32,9 +34,9 @@ swipe = {
transform: 'translateX(' + swipe.offset + 'px)' transform: 'translateX(' + swipe.offset + 'px)'
}); });
}, }
stop: function(e, left, right) { swipe.stop = function(e, left, right) {
if (e.x<=-swipe.tolerance) left(true); if (e.x<=-swipe.tolerance) left(true);
else if (e.x>=swipe.tolerance) right(true); else if (e.x>=swipe.tolerance) right(true);
@ -49,6 +51,4 @@ swipe = {
swipe.obj = null; swipe.obj = null;
swipe.offset = 0; swipe.offset = 0;
} }
};

View File

@ -5,7 +5,7 @@
* @copyright 2014 by Tobias Reich * @copyright 2014 by Tobias Reich
*/ */
visible = {}; visible = {}
visible.albums = function() { visible.albums = function() {
if ($('#tools_albums').css('display')==='block') return true; if ($('#tools_albums').css('display')==='block') return true;