Browse Source

Merge branch '342-sort-tags-for-display' of https://github.com/acdha/TimelineJS into acdha-pulls

pull/767/head
Joe Germuska 10 years ago
parent
commit
2989fefa08
  1. 3
      source/js/VMM.Timeline.TimeNav.js
  2. 7
      source/js/VMM.Timeline.js

3
source/js/VMM.Timeline.TimeNav.js

@ -1545,6 +1545,9 @@ if(typeof VMM.Timeline != 'undefined' && typeof VMM.Timeline.TimeNav == 'undefin
// CREATE TAGS
tags = VMM.Util.deDupeArray(tags);
config.tagSortFunction(tags);
if (tags.length > 3) {
config.nav.rows.current = config.nav.rows.half;
} else {

7
source/js/VMM.Timeline.js

@ -135,7 +135,12 @@ if(typeof VMM != 'undefined' && typeof VMM.Timeline == 'undefined') {
ease: "easeInOutExpo",
duration: 1000,
gmap_key: "",
language: VMM.Language
language: VMM.Language,
tagSortFunction: function (arr) {
arr.sort(function (a, b) {
return a.localeCompare(b);
})
}
};
if ( w != null && w != "") {

Loading…
Cancel
Save