Socket
Socket
Sign inDemoInstall

@interactjs/utils

Package Overview
Dependencies
Maintainers
2
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@interactjs/utils - npm Package Compare versions

Comparing version 1.8.0-alpha.0 to 1.8.0-alpha.1

1

domObjects.js

@@ -7,3 +7,2 @@ const domObjects = {

SVGSVGElement: null,
// eslint-disable-next-line no-undef
SVGElementInstance: null,

@@ -10,0 +9,0 @@ Element: null,

4

getOriginXY.js
import { rectToXY, resolveRectLike } from "./rect.js";
export default function (target, element, action) {
const actionOptions = target.options[action];
export default function (target, element, actionName) {
const actionOptions = target.options[actionName];
const actionOrigin = actionOptions && actionOptions.origin;

@@ -5,0 +5,0 @@ const origin = actionOrigin || target.options.origin;

{
"name": "@interactjs/utils",
"version": "1.8.0-alpha.0",
"version": "1.8.0-alpha.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "publishConfig": {

@@ -16,13 +16,15 @@ import { closest, getElementRect, parentNode } from "./domUtils.js";

export function resolveRectLike(value, target, element, functionArgs) {
if (is.string(value)) {
value = getStringOptionResult(value, target, element);
} else if (is.func(value)) {
value = value(...functionArgs);
let returnValue = value;
if (is.string(returnValue)) {
returnValue = getStringOptionResult(returnValue, target, element);
} else if (is.func(returnValue)) {
returnValue = returnValue(...functionArgs);
}
if (is.element(value)) {
value = getElementRect(value);
if (is.element(returnValue)) {
returnValue = getElementRect(returnValue);
}
return value;
return returnValue;
}

@@ -29,0 +31,0 @@ export function rectToXY(rect) {

function createGrid(grid) {
const coordFields = [['x', 'y'], ['left', 'top'], ['right', 'bottom'], ['width', 'height']].filter(([xField, yField]) => xField in grid || yField in grid);
const gridFunc = function snapGrid(x, y) {
const gridFunc = (x, y) => {
const {

@@ -19,3 +19,6 @@ range,

const result = {
range
range,
grid,
x: null,
y: null
};

@@ -33,3 +36,2 @@

gridFunc._isSnapGrid = true;
gridFunc.grid = grid;

@@ -36,0 +38,0 @@ gridFunc.coordFields = coordFields;

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

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