From 331eef1f57722c25d0b7283fee77203e3f38d2c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stuardo=20-StR-=20Rodr=C3=ADguez?= Date: Thu, 18 Feb 2016 11:15:58 -0500 Subject: [PATCH] Viewport Size Allow viewport height units. Allow to use float as size. example: 1.5em; 33vh; --- src/gridstack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gridstack.js b/src/gridstack.js index 73bdd28..1a7967e 100644 --- a/src/gridstack.js +++ b/src/gridstack.js @@ -1112,7 +1112,7 @@ var height = val; var heightUnit = 'px'; if (height && _.isString(height)) { - var match = height.match(/^([0-9]+)(px|em|rem)?$/); + var match = height.match(/^([0-9]*\.[0-9]+|[0-9]+)(px|em|rem|vh|vw)?$/); if (!match) { throw new Error('Invalid height'); }