Skip to content

Commit

Permalink
Merge branch 'main' into feature/3411-Resize-sidebars-using-mouse
Browse files Browse the repository at this point in the history
* main:
  #3610 - Minimizing icon in document level feature is wrong after updating feature
  #3656 - The color of the existing layers changes after adding another layer
  #3679 - NullPointerException during export in WebAnno format
  #283 - Resize span
  #283 - Resize span
  #283 - Resize span
  #3675 - Clean up more brat code
  #3675 - Clean up more brat code
  #3675 - Clean up more brat code
  #3676 - Error when rejecting annotation suggestion
  #3675 - Clean up more brat code
  #1535 - Keyboard shortcuts do not work when focus is in certain editors
  #3571 - Update dependencies
  #3670 - Remove LIF support
  #3670 - Remove LIF support
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release inception-26.3
  #3650 - Link label shows layer name instead of label
  • Loading branch information
reckart committed Jan 4, 2023
2 parents da485f5 + ba84242 commit 9df73b4
Show file tree
Hide file tree
Showing 45 changed files with 9,292 additions and 8,226 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
package de.tudarmstadt.ukp.clarin.webanno.api.annotation.rendering;

import static java.lang.invoke.MethodHandles.lookup;
import static java.util.Comparator.comparing;
import static java.util.stream.Collectors.toList;
import static org.apache.commons.lang3.exception.ExceptionUtils.getRootCauseMessage;
import static org.slf4j.LoggerFactory.getLogger;

Expand Down Expand Up @@ -98,8 +100,14 @@ public void render(VDocument aVDoc, RenderRequest aRequest)
allLayers = schemaService.listAnnotationLayer(aRequest.getProject());
}

// Sort layers by creation order (i.e. by ID) to ensure the colors remain the same even
// if a new layer is added to a project
var sortedLayers = allLayers.stream() //
.sorted(comparing(AnnotationLayer::getId)) //
.collect(toList());

Map<String[], Queue<String>> colorQueues = new HashMap<>();
for (AnnotationLayer layer : allLayers) {
for (AnnotationLayer layer : sortedLayers) {
ColoringStrategy coloringStrategy = aRequest.getColoringStrategyOverride()
.orElse(coloringService.getStrategy(layer, prefs.get(), colorQueues));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public AnnotationFS handle(MoveSpanAnnotationRequest aRequest) throws Annotation
}

int oldBegin = request.getAnnotation().getBegin();
int oldEnd = request.getAnnotation().getBegin();
int oldEnd = request.getAnnotation().getEnd();
moveSpanAnnotation(request.getCas(), request.getAnnotation(), request.getBegin(),
request.getEnd());

Expand Down
5 changes: 0 additions & 5 deletions inception/inception-app-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,6 @@
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-io-nif</artifactId>
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-io-lif</artifactId>
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-io-imscwb</artifactId>
Expand Down Expand Up @@ -931,7 +927,6 @@
<usedDependency>de.tudarmstadt.ukp.inception.app:inception-review-editor</usedDependency>
<!-- INCEpTION IO Modules - used via Spring -->
<usedDependency>de.tudarmstadt.ukp.inception.app:inception-io-nif</usedDependency>
<usedDependency>de.tudarmstadt.ukp.inception.app:inception-io-lif</usedDependency>
<usedDependency>de.tudarmstadt.ukp.inception.app:inception-io-intertext</usedDependency>
<usedDependency>de.tudarmstadt.ukp.inception.app:inception-io-imscwb</usedDependency>
<usedDependency>de.tudarmstadt.ukp.inception.app:inception-io-perseus</usedDependency>
Expand Down
Loading

0 comments on commit 9df73b4

Please sign in to comment.