Commit 195709ec authored by David Hoksza's avatar David Hoksza
Browse files

sorting of annotations within annotator group in left panel

parent 2d1c00a6
......@@ -106,8 +106,7 @@ ChooseAnnotatorsDialog.prototype.setElementType = function (elementType) {
var paramsDefs = annotator.getParametersDefinitions();
if (paramsDefs.length > 0) {
console.log('annotator', annotator);
annotatorsParams.appendChild(Functions.createElement({
type: "div",
className: "minerva-annotators-params-header",
......@@ -139,7 +138,6 @@ ChooseAnnotatorsDialog.prototype.setElementType = function (elementType) {
content: param.name
});
console.log('param', param);
var toolTip = Functions.createElement({
type: "span",
className: "annotator-tooltip",
......@@ -156,8 +154,6 @@ ChooseAnnotatorsDialog.prototype.setElementType = function (elementType) {
existingParamValue = existingAnnotatorsParameters[annotator.getClassName()][param.name]
}
console.log('existingParamValue', existingParamValue);
if (param.type.indexOf("String") >= 0) {
paramValue = Functions.createElement({
type: "textarea",
......
......@@ -209,6 +209,14 @@ GuiUtils.prototype.createAnnotationList = function (annotations, options) {
groupContainer.appendChild(par);
}
grouppedAnnotations[desc] = grouppedAnnotations[desc].sort(function(a, b) {
const aType = a.getType().toUpperCase();
const bType = b.getType().toUpperCase();
if (aType < bType) return -1;
else if (aType > bType) return 1;
else return 0;
});
for (var j = 0; j < grouppedAnnotations[desc].length; j++) {
cntAnnotations += 1;
......
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