Socket
Socket
Sign inDemoInstall

vue-ripple-directive

Package Overview
Dependencies
10
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.13 to 2.0.0-beta

0

demo/main.js

@@ -0,0 +0,0 @@ import Vue from 'vue'

2

package.json
{
"name": "vue-ripple-directive",
"version": "1.0.13",
"version": "2.0.0-beta",
"description": "Vue Material Ripple Effect Directive",

@@ -5,0 +5,0 @@ "main": "src/ripple.js",

@@ -0,0 +0,0 @@ # Material Ripple Effect

@@ -59,10 +59,18 @@ export default {

// Store target position to change it after
var storedTargetPosition = target.style.position;
// Change target position to relative to guarantee ripples correct positioning
target.style.position = 'relative';
rippleContainer.appendChild(ripple);
document.body.appendChild(rippleContainer);
target.appendChild(rippleContainer);
console.log();
ripple.style.marginLeft = dx + "px";
ripple.style.marginTop = dy + "px";
rippleContainer.style.left = left + (((window.pageXOffset || document.scrollLeft) - (document.clientLeft || 0)) || 0) + "px";
rippleContainer.style.top = top + (((window.pageYOffset || document.scrollTop) - (document.clientTop || 0)) || 0) + "px";
// No need to set positioning because ripple should be child of target and to it's relative position.
// rippleContainer.style.left = left + (((window.pageXOffset || document.scrollLeft) - (document.clientLeft || 0)) || 0) + "px";
// rippleContainer.style.top = top + (((window.pageYOffset || document.scrollTop) - (document.clientTop || 0)) || 0) + "px";
rippleContainer.style.width = width + "px";

@@ -75,4 +83,2 @@ rippleContainer.style.height = height + "px";

rippleContainer.style.direction = 'ltr';
setTimeout(function() {

@@ -96,2 +102,8 @@ ripple.style.width = radius * 2 + "px";

el.removeEventListener('mouseup', clearRipple, false);
// After removing event set position to target to it's original one
// Timeout it's needed to avoid jerky effect of ripple jumping out parent target
setTimeout(function () {
target.style.position = storedTargetPosition;
}, props.transition + 250)
}

@@ -98,0 +110,0 @@

@@ -0,0 +0,0 @@ var path = require('path')

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc