Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clip-rect

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clip-rect - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

7

index.js

@@ -11,3 +11,3 @@ (function (root, factory) {

var ClipRect = function(el, obj) {
if (typeof TweenLite === 'undefiend') {
if (typeof TweenLite === 'undefined') {
return console.error('need GSAP to work.');

@@ -102,3 +102,3 @@ }

return `rect(${c.top}px ${c.right}px ${c.bottom}px ${c.left}px)`;
return 'rect(' + c.top + 'px ' + c.right + 'px ' + c.bottom + 'px ' + c.left + 'px)';
};

@@ -115,3 +115,2 @@

onUpdate: function() {
console.log('dsa');
// Using onUpdate because onStart

@@ -125,3 +124,2 @@ // is not called if the tween is 0 duration.

this.prepare();
console.log('start');

@@ -134,3 +132,2 @@ TweenLite.to(this.el, this.vars.duration, {

this.vars.clearProps && this.clear();
console.log('on complete');
},

@@ -137,0 +134,0 @@ onCompleteScope: this

{
"name": "clip-rect",
"version": "1.0.0",
"version": "1.1.0",
"description": "Helper to create clip rect animation with gsap",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,2 +11,6 @@ # clip-rect

```
npm install clip-rect
```
```javascript
new ClipRect(HTMLElement[, options]);

@@ -28,3 +32,3 @@ ```

# Example
```
```javascript
var el = document.getElementById('box');

@@ -42,3 +46,3 @@

# Example with timeline
```
```javascript
var el = document.getElementById('box');

@@ -70,1 +74,4 @@ var tl = new TimelineLite();

```
![example](http://i.imgur.com/19TFaQH.gif)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc