Push ruleType into matches object, since it is needed later to correctly reposition markup
This commit is contained in:
		
							
								
								
									
										13
									
								
								service2.js
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								service2.js
									
									
									
									
									
								
							@@ -484,7 +484,8 @@ class BesTreeService extends BesService {
 | 
			
		||||
                    rects: clientRects,
 | 
			
		||||
                    highlights: highlights,
 | 
			
		||||
                    range: range,
 | 
			
		||||
                    match: match
 | 
			
		||||
                    match: match,
 | 
			
		||||
                    ruleType: ruleType
 | 
			
		||||
                  })
 | 
			
		||||
                })
 | 
			
		||||
                this.markProofed(node, matches)
 | 
			
		||||
@@ -549,7 +550,10 @@ class BesTreeService extends BesService {
 | 
			
		||||
  repositionAllMarkup() {
 | 
			
		||||
    this.results.forEach(result => {
 | 
			
		||||
      result.matches.forEach(match => {
 | 
			
		||||
        const { clientRects, highlights } = this.addMistakeMarkup(match.range)
 | 
			
		||||
        const { clientRects, highlights } = this.addMistakeMarkup(
 | 
			
		||||
          match.range,
 | 
			
		||||
          match.ruleType
 | 
			
		||||
        )
 | 
			
		||||
        match.rects = clientRects
 | 
			
		||||
        if (match.highlights) match.highlights.forEach(h => h.remove())
 | 
			
		||||
        match.highlights = highlights
 | 
			
		||||
@@ -1287,7 +1291,10 @@ class BesPlainTextService extends BesService {
 | 
			
		||||
  repositionAllMarkup() {
 | 
			
		||||
    this.results.forEach(result => {
 | 
			
		||||
      result.matches.forEach(match => {
 | 
			
		||||
        const { clientRects, highlights } = this.addMistakeMarkup(match.range)
 | 
			
		||||
        const { clientRects, highlights } = this.addMistakeMarkup(
 | 
			
		||||
          match.range,
 | 
			
		||||
          match.ruleType
 | 
			
		||||
        )
 | 
			
		||||
        match.rects = clientRects
 | 
			
		||||
        if (match.highlights) match.highlights.forEach(h => h.remove())
 | 
			
		||||
        match.highlights = highlights
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user