This repository has been archived by the owner on May 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(MovableEventDetails): generate docs for event detail output
- Loading branch information
1 parent
083253a
commit b10a51c
Showing
8 changed files
with
124 additions
and
7 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
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,40 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [svelte-movable](./svelte-movable.md) > [MovableEventDetails](./svelte-movable.movableeventdetails.md) | ||
|
||
## MovableEventDetails interface | ||
|
||
`detail` payload for `movableend` and `movablestart` CustomEvent | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface MovableEventDetails | ||
``` | ||
|
||
## Example | ||
|
||
|
||
```svelte | ||
<script> | ||
function handler(event) { | ||
const { position, node } = event.detail; | ||
console.log('action movable was used on element', node); | ||
console.log('last known position:', position); | ||
} | ||
</script> | ||
|
||
<div | ||
use:movable | ||
on:movablestart={handler} | ||
on:movableend={handler} | ||
/> | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [node](./svelte-movable.movableeventdetails.node.md) | HTMLElement | the node that the action was placed on | | ||
| [position](./svelte-movable.movableeventdetails.position.md) | { left: number; top: number; } | last known position, as in styles.position | | ||
|
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,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [svelte-movable](./svelte-movable.md) > [MovableEventDetails](./svelte-movable.movableeventdetails.md) > [node](./svelte-movable.movableeventdetails.node.md) | ||
|
||
## MovableEventDetails.node property | ||
|
||
the node that the action was placed on | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
node: HTMLElement; | ||
``` |
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,16 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [svelte-movable](./svelte-movable.md) > [MovableEventDetails](./svelte-movable.movableeventdetails.md) > [position](./svelte-movable.movableeventdetails.position.md) | ||
|
||
## MovableEventDetails.position property | ||
|
||
last known position, as in styles.position | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
position: { | ||
left: number; | ||
top: number; | ||
}; | ||
``` |
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
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