All Projects β†’ daybrush β†’ infinite-viewer

daybrush / infinite-viewer

Licence: MIT license
Infinite Viewer is Document Viewer Component with infinite scrolling.

Programming Languages

typescript
32286 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
Vue
7211 projects
CSS
56736 projects
Svelte
593 projects

Projects that are alternatives of or similar to infinite-viewer

Infinitescroll
Infinite Scroll (Endless Scrolling) for RecyclerView in Android
Stars: ✭ 183 (+115.29%)
Mutual labels:  scrolling, infinite
Pickerview
πŸ”Έ A customizable alternative to UIPickerView in Swift.
Stars: ✭ 438 (+415.29%)
Mutual labels:  scrolling, infinite
icosa-viewer
3D Viewer component for Tilt Brush / Open Brush, Google Blocks files and their derivatives
Stars: ✭ 24 (-71.76%)
Mutual labels:  viewer
viewer-navigation.sample
3D model navigation pane: Navigates a 3D model using a synchronized 2D map pane
Stars: ✭ 48 (-43.53%)
Mutual labels:  viewer
3D-Detection-Tracking-Viewer
3D detection and tracking viewer (visualization) for kitti & waymo dataset
Stars: ✭ 150 (+76.47%)
Mutual labels:  viewer
forge.commandline-nodejs
Authorisation and translation via console application: Command line tool demonstrating the authorisation and translation process using a Node.js console application
Stars: ✭ 15 (-82.35%)
Mutual labels:  viewer
react-native-infinite-scroll
A simple implementation of infinite scrolling for React Native.
Stars: ✭ 19 (-77.65%)
Mutual labels:  scrolling
gemini-viewer
WebGL BIM Viewer based on xeoKit-sdk, written with TypeScript.
Stars: ✭ 24 (-71.76%)
Mutual labels:  viewer
momentum
Track movement and basic events with CSS custom properties
Stars: ✭ 19 (-77.65%)
Mutual labels:  scrolling
ng2-go-top-button
A simple customizable go-top-button component for Angular projects.
Stars: ✭ 18 (-78.82%)
Mutual labels:  scrolling
react-sticky-headroom
A React Component to hide a Header using CSS sticky position
Stars: ✭ 22 (-74.12%)
Mutual labels:  scrolling
json-log-viewer
Powerful terminal based viewer for JSON logs using ncurses.
Stars: ✭ 171 (+101.18%)
Mutual labels:  viewer
clever-infinite-scroll
A useful infinite scroll jQuery plugin. It changes title and URL automatically, it's nice for SEO.
Stars: ✭ 56 (-34.12%)
Mutual labels:  scrolling
use-scroll-direction
A simple, performant, and cross-browser hook for detecting scroll direction in your next react app.
Stars: ✭ 24 (-71.76%)
Mutual labels:  scrolling
react-list-any-height
React scroll list for item with any height
Stars: ✭ 12 (-85.88%)
Mutual labels:  scrolling
u-dicom-viewer
A simple web browser DICOM viewer for any device.
Stars: ✭ 91 (+7.06%)
Mutual labels:  viewer
SRCarouselView
A carousel view that only uses two UIImageView to achieve infinite carousel.
Stars: ✭ 56 (-34.12%)
Mutual labels:  infinite
go-spice
SPICE proxy library, written in go
Stars: ✭ 23 (-72.94%)
Mutual labels:  viewer
ManOpen
A macOS GUI application for viewing Unix manual pages.
Stars: ✭ 18 (-78.82%)
Mutual labels:  viewer
PSEventViewer
PSEventViewer (Get-Events) is really useful PowerShell wrapper around Get-WinEvent. One of the features you may be interested in is a simple way of getting β€œhidden” events data
Stars: ✭ 74 (-12.94%)
Mutual labels:  viewer

Infinite Viewer

npm version React Preact Angular Vue Vue 3 Svelte Lit

Infinite Viewer is Document Viewer Component with infinite scrolling up, down, left and right.

Demo / API / Main Project

❗Changed❗

  • Change name useForceWheel to useWheelScroll option

βš™οΈ Installation

npm

$ npm install infinite-viewer

scripts

<script src="//daybrush.com/infinite-viewer/release/latest/dist/infinite-viewer.min.js"></script>

πŸš€ How to use

  • In chrome, the scroll event is used instead of the wheel event due to the backward and forward swipe gesture. If you set overscroll-behavior: none; on the body, you can use useWheelScroll option.
<div class="viewer">
    <div class="viewport">
        AAAA
    </div>
</div>
import InfiniteViewer from "infinite-viewer";

const infiniteViewer = new InfiniteViewer(
    document.querySelector(".viewer"),
    document.querySelector(".viewport"),
    {
        margin: 0,
        threshold: 0, 
        zoom: 1,
        rangeX: [0, 0],
        rangeY: [0, 0],
    },
);

infiniteViewer.on("scroll", () => {
    console.log(infiniteViewer.getScrollLeft(), infiniteViewer.getScrollTop());
});

Structure

  • Before
<div class="viewer">
    <div class="viewport">
        AAAA
    </div>
</div>
  • After
<div class="container">
    <div class="infinite-viewer-wrapper">
        <div class="infinite-viewer-scroll-area"></div>
        <div class="viewport">AAA</div>
    </div>
    <div class="infinite-viewer-scroll-bar infinite-viewer-vertical-scroll-bar">
        <div class="infinite-viewer-scroll-thumb"></div>
    </div>
    <div class="infinite-viewer-scroll-bar infinite-viewer-horizontal-scroll-bar">
        <div class="infinite-viewer-scroll-thumb"></div>
    </div>
</div>

πŸ“¦ Packages

Package Name  Version  Description
react-infinite-viewer A React Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.
ngx-infinite-viewer An Angular Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.
vue-infinite-viewer A Vue Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.
vue3-infinite-viewer A Vue 3 Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.
preact-infinite-viewer A Preact Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.
svelte-infinite-viewer A Svelte Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.
lit-infinite-viewer A Lit Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.

⭐️ Show Your Support

Please give a ⭐️ if this project helped you!

πŸ‘ Contributing

If you have any questions or requests or want to contribute to infinite-viewer or other packages, please write the issue or give me a Pull Request freely.

🐞 Bug Report

If you find a bug, please report to us opening a new Issue on GitHub.

πŸ“ License

This project is MIT licensed.

MIT License

Copyright (c) 2020 Daybrush

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].