Skip to content

Commit

Permalink
Merge branch 'main' into enh-822
Browse files Browse the repository at this point in the history
  • Loading branch information
rmanaem committed Dec 13, 2024
2 parents c2347f9 + 37f6c89 commit ace2fa1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
9 changes: 5 additions & 4 deletions components/annot-categorical.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,24 +152,25 @@
"updateAnnotationCount"
]),
filterOptions(option, label, search) {
// Match the first character of the label with the first character of the search string
if (!label || search[0].toLowerCase() !== label[0].toLowerCase()) {
return false;
}
let labelIndex = 1;
let labelIndex = 0;
for (let searchIndex = 1; searchIndex < search.length; searchIndex++) {
const searchChar = search[searchIndex].toLowerCase();
let matchFound = false;
while (labelIndex < label.length) {
while (labelIndex < label.length-1) {
labelIndex++;
if (label[labelIndex].toLowerCase() === searchChar) {
matchFound = true;
labelIndex++;
break;
}
labelIndex++;
}
if (!matchFound) {
return false;
}
Expand Down
12 changes: 5 additions & 7 deletions components/category-toolgroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,25 @@
...mapMutations([
"createAssessmentTool",
"alterColumnToToolMapping",
"alterColumnCategoryMapping",
"deselectTool"
"alterColumnToToolMapping"
]),
filterOptions(option, label, search) {
// Match the first character of the label with the first character of the search string
if (!label || search[0].toLowerCase() !== label[0].toLowerCase()) {
return false;
}
let labelIndex = 1;
let labelIndex = 0;
for (let searchIndex = 1; searchIndex < search.length; searchIndex++) {
const searchChar = search[searchIndex].toLowerCase();
let matchFound = false;
while (labelIndex < label.length) {
while (labelIndex < label.length-1) {
labelIndex++;
if (label[labelIndex].toLowerCase() === searchChar) {
matchFound = true;
labelIndex++;
break;
}
labelIndex++;
}
if (!matchFound) {
Expand Down
2 changes: 2 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ module.exports = defineConfig({
},

component: {
viewportHeight: 1080,
viewportWidth: 1920,

devServer: {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"TermURL": "nb:Age"
},
"Transformation": {
"Label": "integer value",
"Label": "float value",
"TermURL": "nb:FromFloat"
},
"MissingValues": []
Expand Down
9 changes: 2 additions & 7 deletions store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -944,16 +944,11 @@ export const mutations = {
},

resetState(p_state) {
const initialState = getDefaultState();
Object.keys(p_state).forEach((key) => {
const initialState = getDefaultState();
if (Object.prototype.hasOwnProperty.call(initialState, key)) {
Vue.set(p_state, key, initialState[key]);
}
});
},

deselectTool(p_state, toolIdentifier) {
const toolIndex = p_state.toolTerms.findIndex(tool => tool.identifier === toolIdentifier);
p_state.toolTerms[toolIndex].selected = false;
}
}
};

0 comments on commit ace2fa1

Please sign in to comment.