Gathering detailed insights and metrics for react-element-pan-ts
Gathering detailed insights and metrics for react-element-pan-ts
Gathering detailed insights and metrics for react-element-pan-ts
Gathering detailed insights and metrics for react-element-pan-ts
React component for allowing panning of DOM-elements too large for their container, in a "Google Maps" kind of way
npm install react-element-pan-ts
Typescript
Module System
Node Version
NPM Version
TypeScript (51.35%)
JavaScript (48.65%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2 Stars
50 Commits
1 Forks
2 Watchers
1 Branches
1 Contributors
Updated on Jul 26, 2018
Latest Version
1.1.5
Package Id
react-element-pan-ts@1.1.5
Unpacked Size
86.01 kB
Size
25.02 kB
File Count
10
NPM Version
6.0.0
Node Version
8.9.4
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
3
The original project has added all the benefits provided by this fork, including typescript typings and React 16 updates.
Please use the original react-element-pan as it's being actively maintained.
React component for allowing panning of DOM-elements too large for their container, in a Google Maps-like way. Supports touch devices and should work on IE8+.
This version has been converted to Typescript and it's compatible with React 16.
See the demos page for some demos.
react-element-pan
can be installed using npm:
npm install react-element-pan-ts
1var React = require('react'); 2var ElementPan = require('react-element-pan'); 3 4// Want to use touch events? 5React.initializeTouchEvents(true); 6 7// Render the component 8React.render( 9 new ElementPan({ 10 onPanStart: function() { /* Pan started! */ }, 11 onPanStop: function() { /* Pan ended! */ }, 12 onPan: function() { /* Pan move! */ }, 13 width: 800, // Optional width for the ElementPan container 14 height: 800, // Optional height for the ElementPan container 15 startX: 771, // Optional X coordinate to start at 16 startY: 360 // Optional Y coordinate to start at 17 }, React.DOM.img({ src: 'some-large-image.jpg' }) 18), document.body); 19 20// Or, with JSX: 21React.render( 22 <ElementPan> 23 <img src="some-large-image.jpg" /> 24 </ElementPan>, 25 document.body 26);
Note that startX/startY only works if the content is large enough when the component is mounted. You might want to set a min-width
/min-height
in your CSS for this to work.
Licensed under the MIT License, see LICENSE
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
75 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More