Comparing version 1.0.0 to 1.1.0
@@ -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) | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8638
74
114