- 
                Notifications
    
You must be signed in to change notification settings  - Fork 9
 
          Made TextAnnotatorPopup resilient to the underlying DOM mutations
          #123
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
            rsimon
  merged 28 commits into
  recogito:main
from
oleksandr-danylchenko:spatial-tree-positioning
  
      
      
   
  Nov 21, 2024 
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            28 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      a1b3bf2
              
                Added rects normalization utils
              
              
                oleksandr-danylchenko 405dfee
              
                Added `getAnnotationRects` exposure from the store
              
              
                oleksandr-danylchenko f631f5f
              
                Added popup positioning using the spatial tree bounds
              
              
                oleksandr-danylchenko b59bed6
              
                Added conversion to dom rect list
              
              
                oleksandr-danylchenko 5eaef4e
              
                Added repositioning on target update
              
              
                oleksandr-danylchenko e4a5620
              
                Added reference removal upon closing the popup
              
              
                oleksandr-danylchenko eae94ed
              
                Added reference cleanup when the annotation is removed
              
              
                oleksandr-danylchenko bbfd82d
              
                Merge branch 'main' into spatial-tree-positioning
              
              
                oleksandr-danylchenko 3fdc61a
              
                Merge branch 'main' into spatial-tree-positioning
              
              
                oleksandr-danylchenko 9650d3c
              
                Deduped re-exports
              
              
                oleksandr-danylchenko 8071b73
              
                Merge branch 'fix-testing-component-popup-rendering' into spatial-tre…
              
              
                oleksandr-danylchenko 34dd7b3
              
                Merge branch 'main' into spatial-tree-positioning
              
              
                oleksandr-danylchenko f811c9b
              
                Merge branch 'main' into spatial-tree-positioning
              
              
                oleksandr-danylchenko 565bb6d
              
                Aligned `getIntersecting` type
              
              
                oleksandr-danylchenko d924f42
              
                Merge branch 'main' into spatial-tree-positioning
              
              
                oleksandr-danylchenko 5d5218d
              
                Fixed array iterator type
              
              
                oleksandr-danylchenko fb76657
              
                Fixed renamed generic use
              
              
                oleksandr-danylchenko a004ee4
              
                Merge branch 'main' into spatial-tree-positioning
              
              
                oleksandr-danylchenko c6d36b6
              
                Merged `main` into `spatial-tree-positioning`
              
              
                oleksandr-danylchenko 8a051e3
              
                Merge branch 'main' into spatial-tree-positioning
              
              
                oleksandr-danylchenko 1515f0b
              
                Merge branch 'main' into spatial-tree-positioning
              
              
                oleksandr-danylchenko a5cef01
              
                Fixed imports order
              
              
                oleksandr-danylchenko 9aa433f
              
                Merge branch 'main' into spatial-tree-positioning
              
              
                oleksandr-danylchenko 182f6cb
              
                Added `undefined` bounds support
              
              
                oleksandr-danylchenko 0752c62
              
                Added empty index handling
              
              
                oleksandr-danylchenko 81c76c2
              
                Merge branch 'main' into spatial-tree-positioning
              
              
                oleksandr-danylchenko e427223
              
                Merge branch 'main' into spatial-tree-positioning
              
              
                oleksandr-danylchenko 2ee2f96
              
                Added opening on the bound's presence
              
              
                oleksandr-danylchenko File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| export const normalizeRectWithOffset = (rect: DOMRect, offset: DOMRect): DOMRect => { | ||
| const { left, top, right, bottom } = rect; | ||
| return new DOMRect(left - offset.left, top - offset.top, right - left, bottom - top); | ||
| }; | ||
| 
     | 
||
| export const denormalizeRectWithOffset = (rect: DOMRect, offset: DOMRect): DOMRect => { | ||
| const { left, top, right, bottom } = rect; | ||
| return new DOMRect(left + offset.left, top + offset.top, right - left, bottom - top); | ||
| } | 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.