New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mjolnir.js

Package Overview
Dependencies
Maintainers
8
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mjolnir.js - npm Package Compare versions

Comparing version 2.5.0 to 2.5.1

src/.DS_Store

5

CHANGELOG.md
# Change Log
#### [2.5.1] - May 10, 2021
- Remove deprecated Firefox scroll event (#81)
- Fix event.offsetCenter when root element is 0x0 (#82)
#### [2.5.0] - Apr 20, 2020

@@ -4,0 +9,0 @@

2

dist/es5/constants.js

@@ -67,3 +67,3 @@ "use strict";

MOUSE_EVENTS: ['mousedown', 'mousemove', 'mouseup', 'mouseover', 'mouseout', 'mouseleave'],
WHEEL_EVENTS: ['wheel', 'mousewheel', 'DOMMouseScroll']
WHEEL_EVENTS: ['wheel', 'mousewheel']
};

@@ -70,0 +70,0 @@ exports.INPUT_EVENT_TYPES = INPUT_EVENT_TYPES;

@@ -77,4 +77,4 @@ "use strict";

var rect = rootElement.getBoundingClientRect();
var scaleX = rect.width / rootElement.offsetWidth;
var scaleY = rect.height / rootElement.offsetHeight;
var scaleX = rect.width / rootElement.offsetWidth || 1;
var scaleY = rect.height / rootElement.offsetHeight || 1;
var offsetCenter = {

@@ -81,0 +81,0 @@ x: (center.x - rect.left - rootElement.clientLeft) / scaleX,

@@ -53,3 +53,3 @@ import Hammer from './utils/hammer';

MOUSE_EVENTS: ['mousedown', 'mousemove', 'mouseup', 'mouseover', 'mouseout', 'mouseleave'],
WHEEL_EVENTS: ['wheel', 'mousewheel', 'DOMMouseScroll']
WHEEL_EVENTS: ['wheel', 'mousewheel']
};

@@ -56,0 +56,0 @@ export const EVENT_RECOGNIZER_MAP = {

@@ -71,4 +71,4 @@ const DOWN_EVENT = 1;

const rect = rootElement.getBoundingClientRect();
const scaleX = rect.width / rootElement.offsetWidth;
const scaleY = rect.height / rootElement.offsetHeight;
const scaleX = rect.width / rootElement.offsetWidth || 1;
const scaleY = rect.height / rootElement.offsetHeight || 1;
const offsetCenter = {

@@ -75,0 +75,0 @@ x: (center.x - rect.left - rootElement.clientLeft) / scaleX,

@@ -53,3 +53,3 @@ import Hammer from './utils/hammer';

MOUSE_EVENTS: ['mousedown', 'mousemove', 'mouseup', 'mouseover', 'mouseout', 'mouseleave'],
WHEEL_EVENTS: ['wheel', 'mousewheel', 'DOMMouseScroll']
WHEEL_EVENTS: ['wheel', 'mousewheel']
};

@@ -56,0 +56,0 @@ export var EVENT_RECOGNIZER_MAP = {

@@ -68,4 +68,4 @@ var DOWN_EVENT = 1;

var rect = rootElement.getBoundingClientRect();
var scaleX = rect.width / rootElement.offsetWidth;
var scaleY = rect.height / rootElement.offsetHeight;
var scaleX = rect.width / rootElement.offsetWidth || 1;
var scaleY = rect.height / rootElement.offsetHeight || 1;
var offsetCenter = {

@@ -72,0 +72,0 @@ x: (center.x - rect.left - rootElement.clientLeft) / scaleX,

{
"name": "mjolnir.js",
"description": "An Event Manager",
"version": "2.5.0",
"version": "2.5.1",
"keywords": [

@@ -6,0 +6,0 @@ "hammerjs",

@@ -81,5 +81,3 @@ // Copyright (c) 2017 Uber Technologies, Inc.

// IE
'mousewheel',
// legacy Firefox
'DOMMouseScroll'
'mousewheel'
]

@@ -86,0 +84,0 @@ };

@@ -85,4 +85,4 @@ /* Constants */

// See https://stackoverflow.com/a/26893663/3528533
const scaleX = rect.width / rootElement.offsetWidth;
const scaleY = rect.height / rootElement.offsetHeight;
const scaleX = rect.width / rootElement.offsetWidth || 1;
const scaleY = rect.height / rootElement.offsetHeight || 1;

@@ -89,0 +89,0 @@ // Calculate center relative to the root element

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc