@codemirror/tooltip
Advanced tools
Comparing version 0.19.5 to 0.19.6
@@ -0,1 +1,7 @@ | ||
## 0.19.6 (2021-11-07) | ||
### Bug fixes | ||
Fix an issue where a tooltip arrow wasn't moved along by a horizontal offset. | ||
## 0.19.5 (2021-11-06) | ||
@@ -2,0 +8,0 @@ |
@@ -160,4 +160,4 @@ import { ViewPlugin, Direction, EditorView, logException } from '@codemirror/view'; | ||
let width = size.right - size.left, height = size.bottom - size.top; | ||
let offset = tView.offset || noOffset; | ||
let left = this.view.textDirection == Direction.LTR | ||
let offset = tView.offset || noOffset, ltr = this.view.textDirection == Direction.LTR; | ||
let left = ltr | ||
? Math.min(pos.left - (arrow ? 14 /* Offset */ : 0) + offset.x, measured.innerWidth - width) | ||
@@ -184,3 +184,3 @@ : Math.max(0, pos.left - width + (arrow ? 14 /* Offset */ : 0) - offset.x); | ||
if (arrow) | ||
arrow.style.left = `${pos.left - (left + 14 /* Offset */ - 7 /* Size */)}px`; | ||
arrow.style.left = `${pos.left + (ltr ? offset.x : -offset.x) - (left + 14 /* Offset */ - 7 /* Size */)}px`; | ||
others.push({ left, top, right, bottom: top + height }); | ||
@@ -187,0 +187,0 @@ dom.classList.toggle("cm-tooltip-above", above); |
{ | ||
"name": "@codemirror/tooltip", | ||
"version": "0.19.5", | ||
"version": "0.19.6", | ||
"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
49977