From 19e790fc3ad0abbabad5b37f61c574380644acfb Mon Sep 17 00:00:00 2001 From: j Date: Tue, 5 Mar 2019 19:48:53 +0100 Subject: [PATCH] sort non string keys --- static/js/viewer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/viewer.js b/static/js/viewer.js index 616aacf..d621087 100644 --- a/static/js/viewer.js +++ b/static/js/viewer.js @@ -215,7 +215,11 @@ oml.ui.viewer = function() { }) return } - annotations = Ox.sortBy(annotations, sortKey) + var map = {} + map[sortKey] = function(value) { + return value.toString(); + } + annotations = Ox.sortBy(annotations, sortKey, map) oml.$ui.annotationFolder.empty(); var visibleAnnotations = []; var hasAnnotations = false;