flowable / flowable/flowable-engine

UI Modeler App: Scrolling or zooming loses currently selected elements

Ouverte
#2,149 1 commentaire 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
9.5k
Forks
2.9k
Merge moyen
7 h 8 min
PR mergées (30 j)
2

Description

When using the UI Modeler App, the currently selected elements are lost and the process definition is selected, when using a scrollbar or the zoom functionality from the toolbar.

The behaviour is demonstrated in the following gif files:
![flowableScrolling](https://user-images.githubusercontent.com/1502293/73447722-9f318c00-435f-11ea-9408-80c2edbafec2.gif)
![flowableZooming](https://user-images.githubusercontent.com/1502293/73447723-9f318c00-435f-11ea-8315-e5ec27f3d4ea.gif)

I tried to investigate a possible solution:
flowable-ui-modeler/flowable-ui-modeler-app/src/main/resources/static/editor-app/stencil-controller.js

```
// Only do something if another element is selected (Oryx fires this event multiple times)
if ($scope.selectedShape !== undefined && $scope.selectedShape.getId() === selectedShape.getId()) {
if ($rootScope.forceSelectionRefresh) {
// Switch the flag again, this run will force refresh
$rootScope.forceSelectionRefresh = false;
} else {
// Selected the same element again, no need to update anything
return;
}
}
```

If I add an else block to this if, e.g like this

```
} else {
if (event.elements.length === 0) {
return;
}
}
```

the problem could be fixed, but then the processdefinition itself is not selectable anymore (by clicking on an empty spot)

I could not find any information on the event (e.g. what element was clicked) to adjust the if clause accordingly and it seems the event itself with its attributes comes from deep inside the oryx editor. Here I was a bit lost to find the relevant files / code snippets.

Could you please fix this problem or point me in a direction to fix it myself and submit a merge request? Thanks!

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez dans flowable-ui-modeler/flowable-ui-modeler-app/src/main/resources/static/editor-app/stencil-controller.js et reproduisez le problème en utilisant la barre de défilement et les contrôles de zoom de la barre d’outils présentés dans les GIF liés. Suivez l’événement de sélection et ses elements data afin de distinguer les changements du viewport d’un clic sur un emplacement vide. Le travail est terminé lorsque le défilement ou le zoom conserve les éléments sélectionnés, tandis qu’un clic sur une zone vide sélectionne toujours la définition du processus.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
frontend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.