Skip to content

Commit

Permalink
Add subpixelPositioning to the popup.
Browse files Browse the repository at this point in the history
  • Loading branch information
francois2metz committed May 27, 2024
1 parent f835438 commit 38ee649
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/components/popup.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ export default defineComponent({
type: String as PropType<string>,
default: "240px",
},
/**
* If true, rounding is disabled for placement of the popup, allowing for subpixel positioning and smoother movement when the popup is translated.
* @since 7.1.0
*/
subpixelPositioning: {
type: Boolean as PropType<boolean>,
default: false,
},
/**
* Sets the popup's content to a string of text.
*/
Expand Down Expand Up @@ -164,6 +172,10 @@ export default defineComponent({
() => props.maxWidth,
(v) => popup.setMaxWidth(v),
);
watch(
() => props.subpixelPositioning,
(v) => popup.setSubpixelPositioning(v),
);

onMounted(() => {
if (root.value && !props.text) {
Expand Down

0 comments on commit 38ee649

Please sign in to comment.