Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-native-view-transformer
Advanced tools
Readme
A pure JavaScript RN component that makes ANY views transformable using gestures like pinch, double tap or pull.
npm install --save react-native-view-transformer@latest
import ViewTransformer from 'react-native-view-transformer';
...
render() {
return (
<ViewTransformer>
//ANY views
</ViewTransformer>
);
}
Now, the wrapped views are transformable!
This component accepts following props:
enableTransform
: false to disable transform gestures. Default is true.enableScale
: false to disable scale. Default is true.enableTranslate
: false to disable translateX/Y. Default is true.maxScale
: a number. Default is 1.enableResistance
: true to resist over pan. Defaul is false.maxOverScrollDistance
: a number used to determine final scroll position triggered by fling. Default is 20.onViewTransformed
: a callback called when transform changed, receiving current transform object, {scale: xxx, translateX: xxx, translateY: xxx}.onTransformGestureReleased
: a callback called when the transform gesture is released, receiving current transform object, {scale: xxx, translateX: xxx, translateY: xxx}. Return true to abort further animations like bounce back.updateTransform(transform)
: immediately transform this view.
The most common case is to transform an image, or a photo, which is famous as a PhotoView, or ImageViewer, so I provide a dedicated component react-native-transformable-image
Besides transforming an image, this component is helpful in implementing transition animations.
For example, you want to transform a normal size content into a right-bottom floating small window (like the android youtube app). Using this component, you can do as following:
ViewTransformer.Rect(left, top, right, bottom)
object defines the boundary of a viewViewTransformer.getTransform(fromRect, toRect)
to get the transform objectupdateTransform(transform)
to make the tranform happen( This is immediate, but you can animate it by calculating the intermediate rects and then transform using your own animation loop)FAQs
A pure JavaScript RN component that makes ANY views transformable using gestures like pinch, double tap or pull.
The npm package react-native-view-transformer receives a total of 44 weekly downloads. As such, react-native-view-transformer popularity was classified as not popular.
We found that react-native-view-transformer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.