Skip to content

Commit

Permalink
Merge pull request #128 from NullVoxPopuli/NullVoxPopuli-patch-1-2
Browse files Browse the repository at this point in the history
Allow floaty bit to hide appropriately
  • Loading branch information
ynotdraw authored Aug 24, 2023
2 parents 6dc9ac9 + 21c18b4 commit 3347f8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fair-taxis-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ember-velcro": patch
---

Fixes an issue with visibility
4 changes: 4 additions & 0 deletions ember-velcro/src/modifiers/velcro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,15 @@ export default class VelcroModifier extends Modifier<Signature> {
strategy,
});

const { referenceHidden } = middlewareData.hide;

Object.assign(floatingElement.style, {
top: `${y}px`,
left: `${x}px`,
margin: 0,
visibility: referenceHidden ? 'hidden' : 'visible',
});

setVelcroData?.(middlewareData.metadata);
};

Expand Down

0 comments on commit 3347f8c

Please sign in to comment.