@antv/component 2.1.6 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component.min.js +1 -1
- package/esm/animation/fadeIn.d.ts +1 -1
- package/esm/animation/fadeOut.d.ts +1 -1
- package/esm/animation/utils.d.ts +3 -3
- package/esm/ui/axis/axis.d.ts +1 -1
- package/esm/ui/axis/axis.js +18 -2
- package/esm/ui/axis/axis.js.map +1 -1
- package/esm/ui/axis/classname-map.d.ts +18 -0
- package/esm/ui/axis/classname-map.js +20 -0
- package/esm/ui/axis/classname-map.js.map +1 -0
- package/esm/ui/axis/constant.js +16 -15
- package/esm/ui/axis/constant.js.map +1 -1
- package/esm/ui/axis/guides/grid.d.ts +1 -1
- package/esm/ui/axis/guides/grid.js +8 -1
- package/esm/ui/axis/guides/grid.js.map +1 -1
- package/esm/ui/axis/guides/labels.d.ts +1 -2
- package/esm/ui/axis/guides/labels.js +29 -7
- package/esm/ui/axis/guides/labels.js.map +1 -1
- package/esm/ui/axis/guides/line.js +31 -8
- package/esm/ui/axis/guides/line.js.map +1 -1
- package/esm/ui/axis/guides/ticks.d.ts +1 -1
- package/esm/ui/axis/guides/ticks.js +10 -3
- package/esm/ui/axis/guides/ticks.js.map +1 -1
- package/esm/ui/axis/guides/title.d.ts +1 -1
- package/esm/ui/axis/guides/title.js +6 -2
- package/esm/ui/axis/guides/title.js.map +1 -1
- package/esm/ui/axis/types.d.ts +6 -0
- package/esm/ui/axis/utils/classname.d.ts +46 -0
- package/esm/ui/axis/utils/classname.js +53 -0
- package/esm/ui/axis/utils/classname.js.map +1 -0
- package/esm/ui/axis/utils/index.d.ts +1 -0
- package/esm/ui/axis/utils/index.js +1 -0
- package/esm/ui/axis/utils/index.js.map +1 -1
- package/esm/ui/grid/index.d.ts +1 -1
- package/esm/ui/legend/category/item.d.ts +3 -1
- package/esm/ui/legend/category/item.js +42 -14
- package/esm/ui/legend/category/item.js.map +1 -1
- package/esm/ui/legend/category/items.d.ts +2 -0
- package/esm/ui/legend/category/items.js +12 -9
- package/esm/ui/legend/category/items.js.map +1 -1
- package/esm/ui/legend/category.js +11 -3
- package/esm/ui/legend/category.js.map +1 -1
- package/esm/ui/legend/classname-map.d.ts +37 -0
- package/esm/ui/legend/classname-map.js +38 -0
- package/esm/ui/legend/classname-map.js.map +1 -0
- package/esm/ui/legend/constant.d.ts +1 -0
- package/esm/ui/legend/constant.js +1 -0
- package/esm/ui/legend/constant.js.map +1 -1
- package/esm/ui/legend/continuous/handle.d.ts +1 -0
- package/esm/ui/legend/continuous/handle.js +23 -3
- package/esm/ui/legend/continuous/handle.js.map +1 -1
- package/esm/ui/legend/continuous/ribbon.d.ts +1 -0
- package/esm/ui/legend/continuous/ribbon.js +11 -1
- package/esm/ui/legend/continuous/ribbon.js.map +1 -1
- package/esm/ui/legend/continuous.d.ts +6 -0
- package/esm/ui/legend/continuous.js +77 -10
- package/esm/ui/legend/continuous.js.map +1 -1
- package/esm/ui/legend/title/index.js +5 -1
- package/esm/ui/legend/title/index.js.map +1 -1
- package/esm/ui/legend/title/types.d.ts +1 -0
- package/esm/ui/legend/types.d.ts +1 -0
- package/esm/ui/legend/utils/classname.d.ts +31 -0
- package/esm/ui/legend/utils/classname.js +35 -0
- package/esm/ui/legend/utils/classname.js.map +1 -0
- package/esm/ui/legend/utils/index.d.ts +1 -0
- package/esm/ui/legend/utils/index.js +2 -0
- package/esm/ui/legend/utils/index.js.map +1 -0
- package/esm/ui/navigator/index.js +19 -4
- package/esm/ui/navigator/index.js.map +1 -1
- package/esm/ui/navigator/types.d.ts +1 -0
- package/esm/ui/slider/handle.d.ts +2 -0
- package/esm/ui/slider/handle.js +21 -6
- package/esm/ui/slider/handle.js.map +1 -1
- package/esm/ui/slider/index.js +3 -7
- package/esm/ui/slider/index.js.map +1 -1
- package/esm/util/extend-display-object.d.ts +2 -0
- package/esm/util/extend-display-object.js +7 -1
- package/esm/util/extend-display-object.js.map +1 -1
- package/esm/util/index.d.ts +1 -0
- package/esm/util/index.js +1 -0
- package/esm/util/index.js.map +1 -1
- package/esm/util/keyframe-interpolate.d.ts +1 -1
- package/esm/util/parse-height-from-html.d.ts +1 -0
- package/esm/util/parse-height-from-html.js +95 -0
- package/esm/util/parse-height-from-html.js.map +1 -0
- package/lib/animation/fadeIn.d.ts +1 -1
- package/lib/animation/fadeOut.d.ts +1 -1
- package/lib/animation/utils.d.ts +3 -3
- package/lib/ui/axis/axis.d.ts +1 -1
- package/lib/ui/axis/axis.js +18 -2
- package/lib/ui/axis/axis.js.map +1 -1
- package/lib/ui/axis/classname-map.d.ts +18 -0
- package/lib/ui/axis/classname-map.js +23 -0
- package/lib/ui/axis/classname-map.js.map +1 -0
- package/lib/ui/axis/constant.js +16 -15
- package/lib/ui/axis/constant.js.map +1 -1
- package/lib/ui/axis/guides/grid.d.ts +1 -1
- package/lib/ui/axis/guides/grid.js +8 -1
- package/lib/ui/axis/guides/grid.js.map +1 -1
- package/lib/ui/axis/guides/labels.d.ts +1 -2
- package/lib/ui/axis/guides/labels.js +27 -5
- package/lib/ui/axis/guides/labels.js.map +1 -1
- package/lib/ui/axis/guides/line.js +31 -8
- package/lib/ui/axis/guides/line.js.map +1 -1
- package/lib/ui/axis/guides/ticks.d.ts +1 -1
- package/lib/ui/axis/guides/ticks.js +10 -3
- package/lib/ui/axis/guides/ticks.js.map +1 -1
- package/lib/ui/axis/guides/title.d.ts +1 -1
- package/lib/ui/axis/guides/title.js +6 -2
- package/lib/ui/axis/guides/title.js.map +1 -1
- package/lib/ui/axis/types.d.ts +6 -0
- package/lib/ui/axis/utils/classname.d.ts +46 -0
- package/lib/ui/axis/utils/classname.js +58 -0
- package/lib/ui/axis/utils/classname.js.map +1 -0
- package/lib/ui/axis/utils/index.d.ts +1 -0
- package/lib/ui/axis/utils/index.js +1 -0
- package/lib/ui/axis/utils/index.js.map +1 -1
- package/lib/ui/grid/index.d.ts +1 -1
- package/lib/ui/legend/category/item.d.ts +3 -1
- package/lib/ui/legend/category/item.js +42 -14
- package/lib/ui/legend/category/item.js.map +1 -1
- package/lib/ui/legend/category/items.d.ts +2 -0
- package/lib/ui/legend/category/items.js +11 -8
- package/lib/ui/legend/category/items.js.map +1 -1
- package/lib/ui/legend/category.js +11 -3
- package/lib/ui/legend/category.js.map +1 -1
- package/lib/ui/legend/classname-map.d.ts +37 -0
- package/lib/ui/legend/classname-map.js +41 -0
- package/lib/ui/legend/classname-map.js.map +1 -0
- package/lib/ui/legend/constant.d.ts +1 -0
- package/lib/ui/legend/constant.js +3 -1
- package/lib/ui/legend/constant.js.map +1 -1
- package/lib/ui/legend/continuous/handle.d.ts +1 -0
- package/lib/ui/legend/continuous/handle.js +23 -3
- package/lib/ui/legend/continuous/handle.js.map +1 -1
- package/lib/ui/legend/continuous/ribbon.d.ts +1 -0
- package/lib/ui/legend/continuous/ribbon.js +11 -1
- package/lib/ui/legend/continuous/ribbon.js.map +1 -1
- package/lib/ui/legend/continuous.d.ts +6 -0
- package/lib/ui/legend/continuous.js +76 -9
- package/lib/ui/legend/continuous.js.map +1 -1
- package/lib/ui/legend/title/index.js +5 -1
- package/lib/ui/legend/title/index.js.map +1 -1
- package/lib/ui/legend/title/types.d.ts +1 -0
- package/lib/ui/legend/types.d.ts +1 -0
- package/lib/ui/legend/utils/classname.d.ts +31 -0
- package/lib/ui/legend/utils/classname.js +39 -0
- package/lib/ui/legend/utils/classname.js.map +1 -0
- package/lib/ui/legend/utils/index.d.ts +1 -0
- package/lib/ui/legend/utils/index.js +5 -0
- package/lib/ui/legend/utils/index.js.map +1 -0
- package/lib/ui/navigator/index.js +19 -4
- package/lib/ui/navigator/index.js.map +1 -1
- package/lib/ui/navigator/types.d.ts +1 -0
- package/lib/ui/slider/handle.d.ts +2 -0
- package/lib/ui/slider/handle.js +21 -6
- package/lib/ui/slider/handle.js.map +1 -1
- package/lib/ui/slider/index.js +3 -7
- package/lib/ui/slider/index.js.map +1 -1
- package/lib/util/extend-display-object.d.ts +2 -0
- package/lib/util/extend-display-object.js +7 -0
- package/lib/util/extend-display-object.js.map +1 -1
- package/lib/util/index.d.ts +1 -0
- package/lib/util/index.js +1 -0
- package/lib/util/index.js.map +1 -1
- package/lib/util/keyframe-interpolate.d.ts +1 -1
- package/lib/util/parse-height-from-html.d.ts +1 -0
- package/lib/util/parse-height-from-html.js +99 -0
- package/lib/util/parse-height-from-html.js.map +1 -0
- package/package.json +2 -3
- package/src/ui/axis/axis.ts +19 -2
- package/src/ui/axis/classname-map.ts +22 -0
- package/src/ui/axis/constant.ts +17 -15
- package/src/ui/axis/guides/grid.ts +8 -1
- package/src/ui/axis/guides/labels.ts +35 -9
- package/src/ui/axis/guides/line.ts +50 -12
- package/src/ui/axis/guides/ticks.ts +15 -5
- package/src/ui/axis/guides/title.ts +10 -4
- package/src/ui/axis/types.ts +6 -0
- package/src/ui/axis/utils/classname.ts +62 -0
- package/src/ui/axis/utils/index.ts +1 -0
- package/src/ui/legend/category/item.ts +59 -12
- package/src/ui/legend/category/items.ts +17 -7
- package/src/ui/legend/category.ts +12 -3
- package/src/ui/legend/classname-map.ts +45 -0
- package/src/ui/legend/constant.ts +2 -0
- package/src/ui/legend/continuous/handle.ts +41 -4
- package/src/ui/legend/continuous/ribbon.ts +17 -1
- package/src/ui/legend/continuous.ts +96 -10
- package/src/ui/legend/title/index.ts +5 -1
- package/src/ui/legend/title/types.ts +1 -0
- package/src/ui/legend/types.ts +1 -0
- package/src/ui/legend/utils/classname.ts +39 -0
- package/src/ui/legend/utils/index.ts +1 -0
- package/src/ui/navigator/index.ts +32 -2
- package/src/ui/navigator/types.ts +1 -0
- package/src/ui/slider/handle.ts +44 -6
- package/src/ui/slider/index.ts +3 -4
- package/src/util/extend-display-object.ts +7 -1
- package/src/util/index.ts +1 -0
- package/src/util/parse-height-from-html.ts +94 -0
package/src/ui/slider/handle.ts
CHANGED
|
@@ -14,6 +14,7 @@ export type IconStyleProps = PathStyleProps & {
|
|
|
14
14
|
radius?: number;
|
|
15
15
|
shape?: string | ((type: HandleType) => DisplayObject);
|
|
16
16
|
orientation?: 'horizontal' | 'vertical';
|
|
17
|
+
classNamePrefix?: string;
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
export type LabelStyleProps = Partial<TextStyleProps>;
|
|
@@ -27,6 +28,7 @@ export type HandleStyleProps = GroupStyleProps &
|
|
|
27
28
|
showLabel?: boolean;
|
|
28
29
|
spacing?: number;
|
|
29
30
|
type?: HandleType;
|
|
31
|
+
classNamePrefix?: string;
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
export type HandleOptions = ComponentOptions<HandleStyleProps>;
|
|
@@ -45,13 +47,23 @@ const CLASS_NAMES = classNames(
|
|
|
45
47
|
|
|
46
48
|
class HandleIcon extends Component<IconStyleProps> {
|
|
47
49
|
render(attributes: Required<IconStyleProps>, container: DisplayObject) {
|
|
48
|
-
const { x, y, size = 10, radius = size / 4, orientation, ...iconStyle } = attributes;
|
|
49
|
-
//
|
|
50
|
+
const { x, y, size = 10, radius = size / 4, orientation, classNamePrefix, ...iconStyle } = attributes;
|
|
51
|
+
// default handle
|
|
50
52
|
const width = size!;
|
|
51
53
|
const height = width * 2.4;
|
|
52
54
|
|
|
55
|
+
const rectClassName = classNamePrefix
|
|
56
|
+
? `${CLASS_NAMES.iconRect.name} ${classNamePrefix}handle-icon-rect`
|
|
57
|
+
: CLASS_NAMES.iconRect.name;
|
|
58
|
+
|
|
59
|
+
const lineClassName = (index: number) =>
|
|
60
|
+
classNamePrefix
|
|
61
|
+
? `${CLASS_NAMES.iconLine}-${index} ${classNamePrefix}handle-icon-line`
|
|
62
|
+
: `${CLASS_NAMES.iconLine}-${index}`;
|
|
63
|
+
|
|
53
64
|
const rect = select(container)
|
|
54
65
|
.maybeAppendByClassName(CLASS_NAMES.iconRect, 'rect')
|
|
66
|
+
.attr('className', rectClassName)
|
|
55
67
|
.styles({
|
|
56
68
|
...iconStyle,
|
|
57
69
|
width,
|
|
@@ -67,8 +79,27 @@ class HandleIcon extends Component<IconStyleProps> {
|
|
|
67
79
|
const y1 = y + (1 / 4) * height - height / 2;
|
|
68
80
|
const y2 = y + (3 / 4) * height - height / 2;
|
|
69
81
|
|
|
70
|
-
rect
|
|
71
|
-
|
|
82
|
+
rect
|
|
83
|
+
.maybeAppendByClassName(`${CLASS_NAMES.iconLine}-1`, 'line')
|
|
84
|
+
.attr('className', lineClassName(1))
|
|
85
|
+
.styles({
|
|
86
|
+
x1,
|
|
87
|
+
x2: x1,
|
|
88
|
+
y1,
|
|
89
|
+
y2,
|
|
90
|
+
...iconStyle,
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
rect
|
|
94
|
+
.maybeAppendByClassName(`${CLASS_NAMES.iconLine}-2`, 'line')
|
|
95
|
+
.attr('className', lineClassName(2))
|
|
96
|
+
.styles({
|
|
97
|
+
x1: x2,
|
|
98
|
+
x2,
|
|
99
|
+
y1,
|
|
100
|
+
y2,
|
|
101
|
+
...iconStyle,
|
|
102
|
+
});
|
|
72
103
|
|
|
73
104
|
if (orientation === 'vertical') rect.node().style.transform = 'rotate(90)';
|
|
74
105
|
}
|
|
@@ -119,8 +150,15 @@ export class Handle extends Component<HandleStyleProps> {
|
|
|
119
150
|
}
|
|
120
151
|
|
|
121
152
|
private renderIcon(container: Group) {
|
|
122
|
-
const { x, y, orientation, type } = this.attributes;
|
|
123
|
-
const iconStyle = {
|
|
153
|
+
const { x, y, orientation, type, classNamePrefix } = this.attributes;
|
|
154
|
+
const iconStyle = {
|
|
155
|
+
x,
|
|
156
|
+
y,
|
|
157
|
+
orientation,
|
|
158
|
+
classNamePrefix,
|
|
159
|
+
...HANDLE_ICON_DEFAULT_CFG,
|
|
160
|
+
...subStyleProps(this.attributes, 'icon'),
|
|
161
|
+
};
|
|
124
162
|
const { iconShape = () => new HandleIcon({ style: iconStyle }) } = this.attributes;
|
|
125
163
|
const iconGroup = select(container).maybeAppendByClassName(CLASS_NAMES.iconGroup, 'g');
|
|
126
164
|
iconGroup
|
package/src/ui/slider/index.ts
CHANGED
|
@@ -511,13 +511,12 @@ export class Slider extends Component<SliderStyleProps> {
|
|
|
511
511
|
return orientation === 'horizontal' ? x : y;
|
|
512
512
|
}
|
|
513
513
|
|
|
514
|
-
private setValuesOffset(stOffset: number, endOffset: number = 0
|
|
514
|
+
private setValuesOffset(stOffset: number, endOffset: number = 0) {
|
|
515
515
|
const { type } = this.attributes;
|
|
516
516
|
const [oldStartVal, oldEndVal] = this.getValues();
|
|
517
517
|
const internalStartOffset = type === 'range' ? stOffset : 0;
|
|
518
518
|
const values = [oldStartVal + internalStartOffset, oldEndVal + endOffset].sort() as [number, number];
|
|
519
|
-
|
|
520
|
-
else this.innerSetValues(values, true);
|
|
519
|
+
this.innerSetValues(values, true);
|
|
521
520
|
}
|
|
522
521
|
|
|
523
522
|
private getRatio(val: number) {
|
|
@@ -550,7 +549,7 @@ export class Slider extends Component<SliderStyleProps> {
|
|
|
550
549
|
const offset = deltaY || deltaX;
|
|
551
550
|
const deltaVal = this.getRatio(offset);
|
|
552
551
|
|
|
553
|
-
this.setValuesOffset(deltaVal, deltaVal
|
|
552
|
+
this.setValuesOffset(deltaVal, deltaVal);
|
|
554
553
|
}
|
|
555
554
|
}
|
|
556
555
|
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { isNumber, isString } from '@antv/util';
|
|
2
|
+
import type { HTMLStyleProps } from '@antv/g';
|
|
2
3
|
import type { DisplayObject } from '../shapes';
|
|
3
|
-
import { Text } from '../shapes';
|
|
4
|
+
import { Text, HTML } from '../shapes';
|
|
4
5
|
import type { ExtendDisplayObject } from '../types';
|
|
5
6
|
|
|
6
7
|
export function renderExtDo(el: ExtendDisplayObject): DisplayObject {
|
|
7
8
|
if (typeof el === 'function') return el();
|
|
8
9
|
return isString(el) || isNumber(el) ? new Text({ style: { text: String(el) } }) : el;
|
|
9
10
|
}
|
|
11
|
+
|
|
12
|
+
export function renderHtmlExtDo(el: ExtendDisplayObject, style: Partial<HTMLStyleProps>): DisplayObject {
|
|
13
|
+
if (typeof el === 'function') return el();
|
|
14
|
+
return isString(el) || isNumber(el) ? new HTML({ style: { ...style, innerHTML: String(el) } }) : el;
|
|
15
|
+
}
|
package/src/util/index.ts
CHANGED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// Utility to parse height from an HTML string, limited: `box-sizing: border-box`
|
|
2
|
+
export const parseHeightFromHTML = (html: string): number => {
|
|
3
|
+
const parser = new DOMParser();
|
|
4
|
+
const doc = parser.parseFromString(html, 'text/html');
|
|
5
|
+
const el = doc.body.firstElementChild;
|
|
6
|
+
console.log(el?.getClientRects(), 11);
|
|
7
|
+
|
|
8
|
+
if (!el) return 0;
|
|
9
|
+
|
|
10
|
+
const style = el.getAttribute('style') || '';
|
|
11
|
+
const rules = Object.fromEntries(
|
|
12
|
+
style
|
|
13
|
+
.split(';')
|
|
14
|
+
.map((r) => r.trim())
|
|
15
|
+
.filter((r) => r.includes(':'))
|
|
16
|
+
.map((r) => {
|
|
17
|
+
const [key, value] = r.split(':').map((s) => s.trim());
|
|
18
|
+
return [key.toLowerCase(), value];
|
|
19
|
+
})
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
const parsePx = (v: string): number => {
|
|
23
|
+
if (!v) return 0;
|
|
24
|
+
const match = v.match(/([\d.]+)px/);
|
|
25
|
+
return match ? parseFloat(match[1]) : 0;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
if (rules.height) {
|
|
29
|
+
return parsePx(rules.height);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const fontSize = parsePx(rules['font-size']) || 16;
|
|
33
|
+
|
|
34
|
+
// line-height
|
|
35
|
+
const lineHeight = rules['line-height'];
|
|
36
|
+
let baseHeight;
|
|
37
|
+
if (!lineHeight || lineHeight === 'normal') {
|
|
38
|
+
baseHeight = 1.2 * fontSize; // 默认 normal ≈ 1.2
|
|
39
|
+
} else if (lineHeight.endsWith('px')) {
|
|
40
|
+
baseHeight = parsePx(lineHeight);
|
|
41
|
+
} else if (/^[\d.]+$/.test(lineHeight)) {
|
|
42
|
+
baseHeight = parseFloat(lineHeight) * fontSize;
|
|
43
|
+
} else {
|
|
44
|
+
baseHeight = fontSize; // fallback
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
let paddingTop = parsePx(rules['padding-top']);
|
|
48
|
+
let paddingBottom = parsePx(rules['padding-bottom']);
|
|
49
|
+
|
|
50
|
+
if (rules.padding) {
|
|
51
|
+
const parts = rules.padding.split(/\s+/).map(parsePx);
|
|
52
|
+
if (parts.length === 1) {
|
|
53
|
+
paddingTop = parts[0];
|
|
54
|
+
paddingBottom = parts[0];
|
|
55
|
+
} else if (parts.length === 2) {
|
|
56
|
+
paddingTop = parts[0];
|
|
57
|
+
paddingBottom = parts[0];
|
|
58
|
+
} else if (parts.length === 3) {
|
|
59
|
+
paddingTop = parts[0];
|
|
60
|
+
paddingBottom = parts[2];
|
|
61
|
+
} else if (parts.length === 4) {
|
|
62
|
+
paddingTop = parts[0];
|
|
63
|
+
paddingBottom = parts[2];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
let borderTop = parsePx(rules['border-top-width']);
|
|
68
|
+
let borderBottom = parsePx(rules['border-bottom-width']);
|
|
69
|
+
if (rules.border) {
|
|
70
|
+
const match = rules.border.match(/([\d.]+)px/);
|
|
71
|
+
if (match) {
|
|
72
|
+
borderTop = parseFloat(match[1]);
|
|
73
|
+
borderBottom = parseFloat(match[1]);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (rules['border-width']) {
|
|
77
|
+
const parts = rules['border-width'].split(/\s+/).map(parsePx);
|
|
78
|
+
if (parts.length === 1) {
|
|
79
|
+
borderTop = parts[0];
|
|
80
|
+
borderBottom = parts[0];
|
|
81
|
+
} else if (parts.length === 2) {
|
|
82
|
+
borderTop = parts[0];
|
|
83
|
+
borderBottom = parts[0];
|
|
84
|
+
} else if (parts.length === 3) {
|
|
85
|
+
borderTop = parts[0];
|
|
86
|
+
borderBottom = parts[2];
|
|
87
|
+
} else if (parts.length === 4) {
|
|
88
|
+
borderTop = parts[0];
|
|
89
|
+
borderBottom = parts[2];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return baseHeight + paddingTop + paddingBottom + borderTop + borderBottom;
|
|
94
|
+
};
|