* fixed #194 PHP 5.6 error * - closed #102 added "set waypoint/destination" context menu to route finder module - update "Select2" 4.0.0 -> 4.0.3 - update "Font Awesome" 4.6.1 -> 4.6.3 * - added *.js files for develop branch * - closed #195 fixed "BASE" dir for subDir installations - fixed "Home" menu link * - #195 improved js load path * - added "clear cache" function for manually cache clearing to /setup #200 #105 #158 - added cache size information to /setup - added current pathfinder "VERSION" to /setup - updated "requireJs" 2.1.20 ->2.2.0 - removed unnecessary page cache timings from static templates (page cache) * - added "document_root", "port", "protocol" and "PHP framework version" to /setup page - added new "shattered" wormhole types to "signature table", closed #182, #179 * - added new "delete old signatures" option to "signature reader" dialog, closed #95 * - added new housekeeping cronjob für cached files, closed #200 - added new cache size information to /setup page * - fixed signature groupId/typeId "overwriting" for already known signatures. closed #207 - improved system search dialog. Added trim(); before "api/signatures-> search" request * updated README.me * fixed PHP error "default object from empty value", closed #209 * reduced image file size * - added local storage (IndexedDB) - added local storage for map scroll position. closed #69 * - added "notice" panel for upcoming release information - improved layout for "release dialog" (GitHub API) - improved pagespeed (removed render blocking javascripts) - improved map scrollbar configuration - improved Chrome browser custom scrollbar layout - removed "sign up" buttons from "map panels", closed #214 * - fixed some session and cookie bugs * - added new requirement check for `max_input_vars` to /setup URL, closed #224 * - fixed isWormhole(); bug * -v1.1.1 added js build files
75 lines
2.1 KiB
JavaScript
75 lines
2.1 KiB
JavaScript
/**
|
|
* Created by Exodus on 26.06.2016.
|
|
*/
|
|
define([
|
|
'jquery',
|
|
'app/init',
|
|
'app/util'
|
|
], function($, Init, Util) {
|
|
'use strict';
|
|
|
|
/**
|
|
* init map scrollbar
|
|
* @param config
|
|
* @returns {*}
|
|
*/
|
|
$.fn.initCustomScrollbar = function(config){
|
|
|
|
// default config -------------------------------------------------------------------------
|
|
var defaultConfig = {
|
|
axis: 'x',
|
|
theme: 'light-thick',
|
|
scrollInertia: 300,
|
|
autoExpandScrollbar: false,
|
|
scrollButtons:{
|
|
scrollAmount: 30,
|
|
enable: true
|
|
},
|
|
callbacks:{
|
|
onTotalScrollOffset: 0,
|
|
onTotalScrollBackOffset: 0,
|
|
alwaysTriggerOffsets: true
|
|
},
|
|
|
|
advanced: {
|
|
updateOnBrowserResize: true,
|
|
updateOnContentResize: true,
|
|
autoExpandHorizontalScroll: true,
|
|
autoScrollOnFocus: "div"
|
|
},
|
|
mouseWheel:{
|
|
enable: false, // scroll weel currently disabled
|
|
scrollAmount: 'auto',
|
|
axis: 'x',
|
|
preventDefault: true
|
|
},
|
|
scrollbarPosition: 'inside',
|
|
autoDraggerLength: true
|
|
//autoHideScrollbar: false
|
|
};
|
|
|
|
// init -----------------------------------------------------------------------------------
|
|
config = $.extend(true, {}, defaultConfig, config);
|
|
|
|
return this.each(function(){
|
|
var scrollableElement = $(this);
|
|
|
|
// prevent multiple initialization
|
|
scrollableElement.mCustomScrollbar('destroy');
|
|
|
|
// init custom scrollbars
|
|
scrollableElement.mCustomScrollbar(config);
|
|
});
|
|
};
|
|
|
|
/**
|
|
* scroll to a specific position in the map
|
|
* demo: http://manos.malihu.gr/repository/custom-scrollbar/demo/examples/scrollTo_demo.html
|
|
* @returns {*} // string or id
|
|
*/
|
|
$.fn.scrollToX = function(position){
|
|
return this.each(function(){
|
|
$(this).mCustomScrollbar('scrollTo', position);
|
|
});
|
|
};
|
|
}); |