Commit 1be6d1a6 authored by nextime's avatar nextime

Fix a bug in gui sliding panels

parent d2f25cc7
<? <?
$GUIDEBUG=FALSE; //$GUIDEBUG=FALSE;
//$GUIDEBUG=TRUE; $GUIDEBUG=TRUE;
$BASEGUIPATH=str_replace("/index.php","",$_SERVER['PHP_SELF']); $BASEGUIPATH=str_replace("/index.php","",$_SERVER['PHP_SELF']);
$FSPATH=realpath(dirname(__FILE__)."/.."); $FSPATH=realpath(dirname(__FILE__)."/..");
......
...@@ -283,21 +283,6 @@ window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.document ...@@ -283,21 +283,6 @@ window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.document
$("#alertContainer").fadeOut({duration:timeout, easing:'easeInQuint'}); $("#alertContainer").fadeOut({duration:timeout, easing:'easeInQuint'});
}; };
<? if($left || $right) { ?>
var snapper = new Snap({
resistance: 0,
easing: 'linear',
transitionSpeed: 0.1,
tapToClose: false,
element: $('#content')[0],
dragger: $('#content')[0],
//dragger: $('[data-domotika-dragger="true"]')[0],
minDragDistance: 20,
slideIntent: 30,
touchToDrag: slideEnabled
});
<? } ?>
<? if($left || $right) { ?> <? if($left || $right) { ?>
function calcSnapSize() function calcSnapSize()
...@@ -315,6 +300,21 @@ window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.document ...@@ -315,6 +300,21 @@ window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.document
$(".right-drawer").css("width", mval) $(".right-drawer").css("width", mval)
}); });
var snapper = new Snap({
resistance: 0,
easing: 'linear',
transitionSpeed: 0.1,
tapToClose: false,
element: $('#content')[0],
dragger: $('#content')[0],
//dragger: $('[data-domotika-dragger="true"]')[0],
minDragDistance: 20,
slideIntent: 30,
touchToDrag: slideEnabled,
maxPosition: calcSnapSize(),
minPosition: -calcSnapSize()
});
snapper.on('animating', snapper.on('animating',
function(e) { function(e) {
var mval = calcSnapSize(); var mval = calcSnapSize();
......
...@@ -210,21 +210,6 @@ ...@@ -210,21 +210,6 @@
$("#alertContainer").fadeOut({duration:timeout, easing:'easeInQuint'}); $("#alertContainer").fadeOut({duration:timeout, easing:'easeInQuint'});
}; };
<? if($left || $right) { ?>
var snapper = new Snap({
resistance: 0,
easing: 'linear',
transitionSpeed: 0.1,
tapToClose: false,
element: $('#content')[0],
dragger: $('#content')[0],
//dragger: $('[data-domotika-dragger="true"]')[0],
minDragDistance: 20,
slideIntent: 30,
touchToDrag: slideEnabled
});
<? } ?>
<? if($left || $right) { ?> <? if($left || $right) { ?>
function calcSnapSize() function calcSnapSize()
...@@ -242,6 +227,21 @@ ...@@ -242,6 +227,21 @@
$(".right-drawer").css("width", mval) $(".right-drawer").css("width", mval)
}); });
var snapper = new Snap({
resistance: 0,
easing: 'linear',
transitionSpeed: 0.1,
tapToClose: false,
element: $('#content')[0],
dragger: $('#content')[0],
//dragger: $('[data-domotika-dragger="true"]')[0],
minDragDistance: 20,
slideIntent: 30,
touchToDrag: slideEnabled,
maxPosition: calcSnapSize(),
minPosition: -calcSnapSize()
});
snapper.on('animating', snapper.on('animating',
function(e) { function(e) {
var mval = calcSnapSize(); var mval = calcSnapSize();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment