svelte-movable
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -11,4 +11,10 @@ /** | ||
var extractUnit = function (text, axis) { | ||
var unit = text.slice(-1); | ||
if (unit !== '%' && unit !== 'px') { | ||
var unit = 'px'; | ||
if (text.slice(-1) === '%') { | ||
unit = '%'; | ||
} | ||
else if (text.slice(-2) === 'px') { | ||
unit = 'px'; | ||
} | ||
else { | ||
throw new Error("Invalid delta ".concat(axis !== null && axis !== void 0 ? axis : '', " unit. Only 'px' and '%' are supported.")); | ||
@@ -15,0 +21,0 @@ } |
{ | ||
"name": "svelte-movable", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Action to move node on mousedown", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
34182
494
0