-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from mojabyte/master
Improve arrow positioning
- Loading branch information
Showing
15 changed files
with
90 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<div id="container"> | ||
<div id="transform"> | ||
<div id="reference"></div> | ||
<div id="popper"></div> | ||
<div id="arrow"></div> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
@import '_reset.css'; | ||
|
||
#container { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
#transform { | ||
transform: translate(10px, 10px); | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
#reference { | ||
width: 40px; | ||
height: 40px; | ||
} | ||
|
||
#popper { | ||
width: 100px; | ||
height: 100px; | ||
} | ||
|
||
#arrow{ | ||
position: fixed; | ||
width: 10px; | ||
height: 10px; | ||
background: black; | ||
transform: translate(-50%, -50%) rotate(45deg); | ||
} | ||
</style> | ||
|
||
<script type="module"> | ||
import {reposition} from '/dist/nanopop.mjs'; | ||
|
||
const reference = document.querySelector('#reference'); | ||
const popper = document.querySelector('#popper'); | ||
const arrow = document.querySelector('#arrow'); | ||
|
||
reposition(reference, popper, { | ||
position: location.hash.slice(1), | ||
arrow: arrow | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+5.34 KB
tests/arrow.spec.ts-snapshots/with-arrow-transformed-parent-html-bottom-end.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.34 KB
tests/arrow.spec.ts-snapshots/with-arrow-transformed-parent-html-bottom-middle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.34 KB
tests/arrow.spec.ts-snapshots/with-arrow-transformed-parent-html-bottom-start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.33 KB
tests/arrow.spec.ts-snapshots/with-arrow-transformed-parent-html-left-end.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.34 KB
tests/arrow.spec.ts-snapshots/with-arrow-transformed-parent-html-left-middle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.34 KB
tests/arrow.spec.ts-snapshots/with-arrow-transformed-parent-html-left-start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.33 KB
tests/arrow.spec.ts-snapshots/with-arrow-transformed-parent-html-right-end.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.34 KB
tests/arrow.spec.ts-snapshots/with-arrow-transformed-parent-html-right-middle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.34 KB
tests/arrow.spec.ts-snapshots/with-arrow-transformed-parent-html-right-start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.34 KB
tests/arrow.spec.ts-snapshots/with-arrow-transformed-parent-html-top-end.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.33 KB
tests/arrow.spec.ts-snapshots/with-arrow-transformed-parent-html-top-middle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.34 KB
tests/arrow.spec.ts-snapshots/with-arrow-transformed-parent-html-top-start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.