renamed option `slide` to `controlsidebarSlide` and tweaked a bit the animate step

pull/2197/head
REJack 2019-08-11 14:16:27 +02:00
parent ac6a58c118
commit fd8183c965
No known key found for this signature in database
GPG Key ID: 9F3976CC630CC888
1 changed files with 7 additions and 7 deletions

View File

@ -34,7 +34,7 @@ const ControlSidebar = (($) => {
}
const Default = {
slide: true
controlsidebarSlide: true
}
/**
@ -52,11 +52,11 @@ const ControlSidebar = (($) => {
show() {
// Show the control sidebar
if (this._config.slide) {
if (this._config.controlsidebarSlide) {
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
$('body').removeClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function(){
$(Selector.CONTROL_SIDEBAR).hide()
$('body').removeClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(50).queue(function(){
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
$(Selector.CONTROL_SIDEBAR).fadeOut()
$(this).dequeue()
})
} else {
@ -66,10 +66,10 @@ const ControlSidebar = (($) => {
collapse() {
// Collapse the control sidebar
if (this._config.slide) {
if (this._config.controlsidebarSlide) {
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
$(Selector.CONTROL_SIDEBAR).show().delay(100).queue(function(){
$('body').addClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function(){
$(Selector.CONTROL_SIDEBAR).show().delay(50).queue(function(){
$('body').addClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(50).queue(function(){
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
$(this).dequeue()
})