@codemirror/tooltip
Advanced tools
Comparing version 0.19.6 to 0.19.7
@@ -0,1 +1,7 @@ | ||
## 0.19.7 (2021-11-17) | ||
### Bug fixes | ||
Make sure window resizing doesn't make tooltips stick out of the visible viewport. | ||
## 0.19.6 (2021-11-07) | ||
@@ -2,0 +8,0 @@ |
@@ -23,3 +23,3 @@ import { ViewPlugin, Direction, EditorView, logException } from '@codemirror/view'; | ||
t.update(update); | ||
return { shouldMeasure: false }; | ||
return false; | ||
} | ||
@@ -51,3 +51,3 @@ let tooltipViews = []; | ||
this.tooltipViews = tooltipViews; | ||
return { shouldMeasure: true }; | ||
return true; | ||
} | ||
@@ -81,2 +81,4 @@ } | ||
this.manager = new TooltipViewManager(view, showTooltip, t => this.createTooltip(t)); | ||
this.maybeMeasure = this.maybeMeasure.bind(this); | ||
window.addEventListener("resize", this.maybeMeasure); | ||
this.maybeMeasure(); | ||
@@ -96,3 +98,3 @@ } | ||
update(update) { | ||
let { shouldMeasure } = this.manager.update(update); | ||
let shouldMeasure = this.manager.update(update) || update.geometryChanged; | ||
let newConfig = update.state.facet(tooltipConfig); | ||
@@ -138,2 +140,3 @@ if (newConfig.position != this.position) { | ||
dom.remove(); | ||
window.removeEventListener("resize", this.maybeMeasure); | ||
} | ||
@@ -140,0 +143,0 @@ readMeasure() { |
{ | ||
"name": "@codemirror/tooltip", | ||
"version": "0.19.6", | ||
"version": "0.19.7", | ||
"description": "Tooltip support for the CodeMirror code editor", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50438
1127