-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: trigger hover after scroll * chore: rename property and add note * test: should trigger mousemove after scroll * chore: ci pass * feat: add option to control hover after scroll * test: set hover after scroll option to true * docs: hover after scroll - description in interaction chapter - one demo * chore: config button in react playground * chore: update screenshot link --------- Co-authored-by: 刘嘉一 <[email protected]>
- Loading branch information
1 parent
87b7867
commit f9f97b0
Showing
10 changed files
with
179 additions
and
39 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
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
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
31 changes: 31 additions & 0 deletions
31
s2-site/examples/interaction/basic/demo/hover-after-scroll.ts
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 @@ | ||
import { PivotSheet, S2Options } from '@antv/s2'; | ||
|
||
fetch( | ||
'https://gw.alipayobjects.com/os/bmw-prod/2a5dbbc8-d0a7-4d02-b7c9-34f6ca63cff6.json', | ||
) | ||
.then((res) => res.json()) | ||
.then((dataCfg) => { | ||
const container = document.getElementById('container'); | ||
|
||
const s2Options: S2Options = { | ||
width: 600, | ||
height: 480, | ||
style: { | ||
cellCfg: { | ||
height: 100, | ||
}, | ||
}, | ||
interaction: { | ||
// 悬停高亮 | ||
hoverHighlight: true, | ||
// 滚动后自动触发悬停状态 | ||
hoverAfterScroll: true, | ||
}, | ||
tooltip: { | ||
showTooltip: true, | ||
}, | ||
}; | ||
const s2 = new PivotSheet(container, dataCfg, s2Options); | ||
|
||
s2.render(); | ||
}); |
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