fix: no more gaps if h spacing is zero

- fixes #31
This commit is contained in:
Ivan Mikheykin
2019-02-21 20:44:38 +03:00
parent c37d116550
commit dee408e7a3
3 changed files with 17 additions and 1 deletions
+8
View File
@@ -363,6 +363,10 @@ System.register(['lodash', 'jquery', 'moment', 'app/core/utils/kbn', 'app/core/c
// Card width should be MIN_CARD_SIZE at least // Card width should be MIN_CARD_SIZE at least
w = Math.max(w, MIN_CARD_SIZE); w = Math.max(w, MIN_CARD_SIZE);
if (cardHSpacing == 0) {
w = w + 1;
}
return w; return w;
} }
@@ -389,6 +393,10 @@ System.register(['lodash', 'jquery', 'moment', 'app/core/utils/kbn', 'app/core/c
// Card height should be MIN_CARD_SIZE at least // Card height should be MIN_CARD_SIZE at least
h = Math.max(h, MIN_CARD_SIZE); h = Math.max(h, MIN_CARD_SIZE);
if (cardVSpacing == 0) {
h = h + 1;
}
return h; return h;
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+8
View File
@@ -394,6 +394,10 @@ export default function link(scope, elem, attrs, ctrl) {
// Card width should be MIN_CARD_SIZE at least // Card width should be MIN_CARD_SIZE at least
w = Math.max(w, MIN_CARD_SIZE); w = Math.max(w, MIN_CARD_SIZE);
if (cardHSpacing == 0) {
w = w+1;
}
return w; return w;
} }
@@ -420,6 +424,10 @@ export default function link(scope, elem, attrs, ctrl) {
// Card height should be MIN_CARD_SIZE at least // Card height should be MIN_CARD_SIZE at least
h = Math.max(h, MIN_CARD_SIZE); h = Math.max(h, MIN_CARD_SIZE);
if (cardVSpacing == 0) {
h = h+1
}
return h; return h;
} }