Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: add useSideWheel docs * chore: change default value of useSideWheel
- Loading branch information
Showing
14 changed files
with
138 additions
and
5 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
Empty file.
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,14 @@ | ||
<div class="examples"> | ||
<div class="items horizontal" [ngxConveyer]="{ useSideWheel: true }"> | ||
<div class="item">1</div> | ||
<div class="item">2</div> | ||
<div class="item">3</div> | ||
<div class="item">4</div> | ||
<div class="item">5</div> | ||
<div class="item">6</div> | ||
<div class="item">7</div> | ||
<div class="item">8</div> | ||
<div class="item">9</div> | ||
<div class="item">10</div> | ||
</div> | ||
</div> |
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,14 @@ | ||
<div class="examples"> | ||
<div class="items horizontal"> | ||
<div class="item">1</div> | ||
<div class="item">2</div> | ||
<div class="item">3</div> | ||
<div class="item">4</div> | ||
<div class="item">5</div> | ||
<div class="item">6</div> | ||
<div class="item">7</div> | ||
<div class="item">8</div> | ||
<div class="item">9</div> | ||
<div class="item">10</div> | ||
</div> | ||
</div> |
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,5 @@ | ||
import Conveyer from "@egjs/conveyer"; | ||
|
||
const conveyer = new Conveyer(".items", { | ||
useSideWheel: true, | ||
}); |
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,23 @@ | ||
<script> | ||
import { useConveyer } from "@egjs/svelte-conveyer"; | ||
|
||
const { | ||
ref, | ||
} = useConveyer({ | ||
horizontal: false, | ||
}); | ||
</script> | ||
<div class="examples"> | ||
<div class="items horizontal" use:ref> | ||
<div class="item">1</div> | ||
<div class="item">2</div> | ||
<div class="item">3</div> | ||
<div class="item">4</div> | ||
<div class="item">5</div> | ||
<div class="item">6</div> | ||
<div class="item">7</div> | ||
<div class="item">8</div> | ||
<div class="item">9</div> | ||
<div class="item">10</div> | ||
</div> | ||
</div> |
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,31 @@ | ||
<template> | ||
<div class="examples"> | ||
<div class="items horizontal" ref="ref"> | ||
<div class="item">1</div> | ||
<div class="item">2</div> | ||
<div class="item">3</div> | ||
<div class="item">4</div> | ||
<div class="item">5</div> | ||
<div class="item">6</div> | ||
<div class="item">7</div> | ||
<div class="item">8</div> | ||
<div class="item">9</div> | ||
<div class="item">10</div> | ||
</div> | ||
</div> | ||
</template> | ||
<script lang="ts"> | ||
import { useConveyer } from "@egjs/vue-conveyer"; | ||
|
||
export default { | ||
setup() { | ||
const { ref } = useConveyer({ | ||
useSideWheel: true, | ||
}); | ||
|
||
return { | ||
ref, | ||
}; | ||
}, | ||
}; | ||
</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
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,21 @@ | ||
--- | ||
title: Using Side Wheel | ||
custom_edit_url: null | ||
--- | ||
|
||
You can move conveyer by using the mouse wheel in a direction aside from the scroll direction. | ||
|
||
If the useSideWheel option is set to true, horizontal conveyer can be moved with the vertical mouse wheel and the vertical conveyer can be moved with the horizontal mouse wheel. | ||
|
||
|Property|Type|Description| | ||
|:---:|:---:|---| | ||
|[useSideWheel](/docs/api/ConveyerOptions)|boolean|Whether to use the mouse wheel in a direction aside from the scroll direction (default: false)| | ||
|
||
import ConveyerCodeTabs from "@site/docs/codes/ConveyerCodeTabs"; | ||
import SideWheel from "@site/src/examples/SideWheel"; | ||
|
||
|
||
|
||
|
||
<SideWheel /> | ||
<ConveyerCodeTabs folder="SideWheel" reactCode={require("!!raw-loader!@site/src/examples/SideWheel.tsx").default} /> |
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
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,24 @@ | ||
import * as React from "react"; | ||
import { useConveyer } from "@egjs/react-conveyer"; | ||
|
||
export default function SideWheel() { | ||
const ref = React.useRef<HTMLDivElement>(); | ||
useConveyer(ref, { | ||
horizontal: true, | ||
useSideWheel: true, | ||
}); | ||
return <div className="examples"> | ||
<div className="items horizontal" ref={ref}> | ||
<div className="item">1</div> | ||
<div className="item">2</div> | ||
<div className="item">3</div> | ||
<div className="item">4</div> | ||
<div className="item">5</div> | ||
<div className="item">6</div> | ||
<div className="item">7</div> | ||
<div className="item">8</div> | ||
<div className="item">9</div> | ||
<div className="item">10</div> | ||
</div> | ||
</div>; | ||
} |