Skip to content

Commit

Permalink
Merge pull request #5271 from inception-project/bugfix/5270-Resizing-…
Browse files Browse the repository at this point in the history
…a-span-also-resizes-other-overlapping-or-stacked-spans

#5270 - Resizing a span also resizes other overlapping or stacked spans
  • Loading branch information
reckart authored Feb 2, 2025
2 parents 90580f5 + 0caa871 commit 381d42d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ jobs:
egress-policy: block
disable-sudo: true
allowed-endpoints: >
api.github.com:443
archive.ics.uci.edu:80
auth.docker.io:443
build.shibboleth.net:443
centralus.data.mcr.microsoft.com:443
download.eclipse.org:443
eastus.data.mcr.microsoft.com:443
api.github.com:443
github.com:443
mcr.microsoft.com:443
nodejs.org:443
Expand All @@ -45,6 +47,8 @@ jobs:
registry-1.docker.io:443
registry.npmjs.org:443
repo.maven.apache.org:443
repo.spring.io:443
repo1.maven.org:443
westus.data.mcr.microsoft.com:443
westus2.data.mcr.microsoft.com:443
www.ims.uni-stuttgart.de:443
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.uima.jcas.tcas.Annotation;
import org.springframework.context.event.EventListener;

import de.tudarmstadt.ukp.dkpro.core.api.segmentation.type.Token;
import de.tudarmstadt.ukp.inception.schema.api.AnnotationSchemaService;

public class TokenAttachedSpanChangeListener
Expand All @@ -39,9 +40,11 @@ public TokenAttachedSpanChangeListener(AnnotationSchemaService aSchemaService)
@EventListener
public void onSpanMovedEvent(SpanMovedEvent aEvent)
{
adjustAttachedAnnotations(aEvent);
adjustSingleTokenAnchoredAnnotations(aEvent);
adjustTokenAnchoredAnnotations(aEvent);
if (aEvent.getAnnotation() instanceof Token) {
adjustAttachedAnnotations(aEvent);
adjustSingleTokenAnchoredAnnotations(aEvent);
adjustTokenAnchoredAnnotations(aEvent);
}
}

void adjustTokenAnchoredAnnotations(SpanMovedEvent aEvent)
Expand Down

0 comments on commit 381d42d

Please sign in to comment.