taye / interact.js

JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)
http://interactjs.io/
MIT License
12.19k stars 782 forks source link

Resize modifier - wrong types #1026

Closed brano-hozza closed 3 months ago

brano-hozza commented 6 months ago

If you have questions about the API that aren't answered in the docs or FAQ, try asking in the Gitter chatroom or on Stackoverflow.

If you've found something that looks like a bug, include a link to a minimal demo on JSFilddle, Codepen with instructions to reproduce the bug with and roughly follow the following issue description format:

Expected behavior

In interact.modifiers.restrictSize RestrictSizeOptions properties min and max should also take Size type where I do not need to specify one of the properties, because I don't want to restrict them.

Actual behavior

Can't set this to null or undefined image

System configuration

interact.js version: 1.10.26 Browser name and version: Chrome Version 120.0.6099.71 (Official Build) (64-bit) Operating System: Windows 11

taye commented 3 months ago

You can use 0 or -Infinity for the min and Infinity for the max