From 415e88b7a3a250036a1368f6dd2692f02211703d Mon Sep 17 00:00:00 2001 From: Misha Gladkiy Date: Tue, 30 Jul 2019 15:05:55 +0300 Subject: [PATCH] Changed minimum frame size to 1% (according to CP-5621) --- src/style.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/style.js b/src/style.js index da64554..cc39bdb 100644 --- a/src/style.js +++ b/src/style.js @@ -1,4 +1,6 @@ const handleSize = 8; +const handleMinWidth = '1vw'; +const handleMinHeight = '1vh'; const style = { Region: { position: 'absolute', @@ -12,6 +14,8 @@ const style = { right: -1 * handleSize/2, width: handleSize, height: handleSize, + minWidth: handleMinWidth, + maxHeight: handleMinHeight, outline: '1px solid rgba(0,0,0,0.5)', border: '1px solid rgba(255,255,255,0.5)', cursor: 'se-resize' @@ -22,6 +26,8 @@ const style = { left: -1 * handleSize/2, width: handleSize, height: handleSize, + minWidth: handleMinWidth, + maxHeight: handleMinHeight, outline: '1px solid rgba(0,0,0,0.5)', border: '1px solid rgba(255,255,255,0.5)', cursor: 'sw-resize' @@ -31,6 +37,8 @@ const style = { top: -1 * handleSize/2, left: -1 * handleSize/2, width: handleSize, + minWidth: handleMinWidth, + maxHeight: handleMinHeight, height: handleSize, outline: '1px solid rgba(0,0,0,0.5)', border: '1px solid rgba(255,255,255,0.5)', @@ -42,6 +50,8 @@ const style = { right: -1 * handleSize/2, width: handleSize, height: handleSize, + minWidth: handleMinWidth, + maxHeight: handleMinHeight, outline: '1px solid rgba(0,0,0,0.5)', border: '1px solid rgba(255,255,255,0.5)', cursor: 'ne-resize'