mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-24 23:51:08 +00:00
optimise common case for highlights (triggered on mousemove)
This commit is contained in:
parent
5244fddce2
commit
5050c8c023
1 changed files with 5 additions and 2 deletions
|
@ -106,8 +106,11 @@ define [
|
|||
labelToShow = label
|
||||
|
||||
if !labelToShow?
|
||||
@$scope.$apply () =>
|
||||
@$scope.annotationLabel.show = false
|
||||
# this is the most common path, triggered on mousemove, so
|
||||
# for performance only apply setting when it changes
|
||||
if @$scope?.annotationLabel?.show != false
|
||||
@$scope.$apply () =>
|
||||
@$scope.annotationLabel.show = false
|
||||
else
|
||||
$ace = $(@editor.renderer.container).find(".ace_scroller")
|
||||
# Move the label into the Ace content area so that offsets and positions are easy to calculate.
|
||||
|
|
Loading…
Reference in a new issue