Skip to content

Commit

Permalink
added tag 'release-beta-2024-02-07-14.31/+0100' for beta version in f…
Browse files Browse the repository at this point in the history
…older beta.
  • Loading branch information
klues committed Feb 7, 2024
1 parent e803e34 commit ba43b80
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion latest/app/build/asterics-grid.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion latest/serviceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ self.addEventListener('install', (event) => {
self.addEventListener('activate', event => {
clients.claim();
sendToClients({type: constants.SW_EVENT_ACTIVATED, activated: true});
console.log('Service Worker active! Version: https://github.com/asterics/AsTeRICS-Grid/releases/tag/release-beta-2024-02-07-14.13/+0100');
console.log('Service Worker active! Version: https://github.com/asterics/AsTeRICS-Grid/releases/tag/release-beta-2024-02-07-14.31/+0100');
});

self.addEventListener('message', (event) => {
Expand Down
23 changes: 15 additions & 8 deletions latest/src/js/service/collectElementService.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,13 @@ function getActionOfType(elem, type) {
return elem.actions[index];
}

function getActionsOfType(elem, type) {
if (!elem) {
return [];
}
return elem.actions.filter(action => action.modelName === type);
}

function getActionTypes(elem) {
return elem.actions.map((action) => action.modelName);
}
Expand Down Expand Up @@ -521,6 +528,14 @@ $(window).on(constants.ELEMENT_EVENT_ID, function (event, element) {
if (getActionTypes(element).some((type) => ignoreActions.includes(type))) {
return; // dont collect elements containing "ignoreActions"
}
let navigateAction = getActionOfType(element, GridActionNavigate.getModelName());
if (navigateAction && getLabel(element).length !== 1 && !navigateAction.addToCollectElem) {
return; // no adding of text if the element contains an navigate action and it's no single keyboard character
}
let wordFormActions = getActionsOfType(element, GridActionWordForm.getModelName());
if (wordFormActions.length > 0 && wordFormActions.some(a => a.type === GridActionWordForm.WORDFORM_MODE_NEXT_FORM)) {
return; // no adding, since the action itself adds the element
}
if (element.dontCollect) {
return;
}
Expand All @@ -532,14 +547,6 @@ $(window).on(constants.ELEMENT_EVENT_ID, function (event, element) {
return;
}
}
let navigateAction = getActionOfType(element, GridActionNavigate.getModelName());
if (navigateAction && getLabel(element).length !== 1 && !navigateAction.addToCollectElem) {
return; // no adding of text if the element contains an navigate action and it's no single keyboard character
}
let wordFormAction = getActionOfType(element, GridActionWordForm.getModelName());
if (wordFormAction && wordFormAction.type === GridActionWordForm.WORDFORM_MODE_NEXT_FORM) {
return; // no adding, since the action itself adds the element
}

if (element.type === GridElement.ELEMENT_TYPE_NORMAL) {
element.wordFormTags = stateService.getCurrentWordFormTags();
Expand Down

0 comments on commit ba43b80

Please sign in to comment.