mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 21:16:00 +00:00
sqlgen design
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<script context="module">
|
||||
export function computeSplitterSize(initialValue, clientSize) {
|
||||
if (_.isString(initialValue) && initialValue.startsWith('~') && initialValue.endsWith('px'))
|
||||
return clientSize - parseInt(initialValue.slice(1, -2));
|
||||
if (_.isString(initialValue) && initialValue.endsWith('px')) return parseInt(initialValue.slice(0, -2));
|
||||
if (_.isString(initialValue) && initialValue.endsWith('%'))
|
||||
return (clientSize * parseFloat(initialValue.slice(0, -1))) / 100;
|
||||
|
||||
Reference in New Issue
Block a user