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

@cnbritain/merlin-frontend-elementmagnify-js

Package Overview
Dependencies
Maintainers
4
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cnbritain/merlin-frontend-elementmagnify-js - npm Package Compare versions

Comparing version 1.5.3 to 1.5.4

19

js/ElementMagnifyTouch.js

@@ -39,4 +39,2 @@ "use strict";

// console.log(el);
this.el = el;

@@ -48,2 +46,5 @@ this.image = {

};
options.minScale = calculateMinScale(this.image.width, this.image.height);
this.isOpen = false;

@@ -290,2 +291,16 @@ this.maxScale = options.maxScale;

function calculateMinScale( imageWidth, imageHeight ){
var minScale = 1;
// Landscape
if( imageWidth > imageHeight ){
minScale = ( window.innerWidth - outerPadding - outerPadding ) /
imageWidth;
// Portrait or square
} else {
minScale = ( window.innerHeight - outerPadding - outerPadding ) /
imageHeight;
}
return minScale;
}
function clampPosition(_x, _y, scale, imageWidth, imageHeight) {

@@ -292,0 +307,0 @@ var maxX = Math.ceil(scale * imageWidth / 2);

2

package.json
{
"name": "@cnbritain/merlin-frontend-elementmagnify-js",
"cnOptions": {},
"version": "1.5.3",
"version": "1.5.4",
"description": "A handy-dandy reusuable front-end component for great justice.",

@@ -6,0 +6,0 @@ "main": "js/index.js",

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