@easyv/config
Advanced tools
Comparing version 1.2.14 to 1.2.15
@@ -361,3 +361,7 @@ "use strict"; | ||
font: defaultFont, | ||
maxWidth: 40 | ||
maxWidth: 40, | ||
translate: { | ||
x: 0, | ||
y: 0 | ||
} | ||
}, | ||
@@ -370,3 +374,7 @@ percent: { | ||
gap: 0, | ||
font: defaultFont | ||
font: defaultFont, | ||
translate: { | ||
x: 0, | ||
y: 0 | ||
} | ||
}, | ||
@@ -379,2 +387,6 @@ value: { | ||
font: defaultFont, | ||
translate: { | ||
x: 0, | ||
y: 0 | ||
}, | ||
suffix: { | ||
@@ -426,2 +438,8 @@ show: true, | ||
overflow = _ref3$name.overflow, | ||
_ref3$name$translate = _ref3$name.translate; | ||
_ref3$name$translate = _ref3$name$translate === void 0 ? defaultLegendOfPie.name.translate : _ref3$name$translate; | ||
var _ref3$name$translate$ = _ref3$name$translate.x, | ||
nameX = _ref3$name$translate$ === void 0 ? defaultLegendOfPie.name.translate.x : _ref3$name$translate$, | ||
_ref3$name$translate$2 = _ref3$name$translate.y, | ||
nameY = _ref3$name$translate$2 === void 0 ? defaultLegendOfPie.name.translate.y : _ref3$name$translate$2, | ||
_ref3$percent = _ref3.percent; | ||
@@ -441,2 +459,8 @@ _ref3$percent = _ref3$percent === void 0 ? defaultLegendOfPie.percent : _ref3$percent; | ||
percentFont = _ref3$percent$font === void 0 ? defaultLegendOfPie.percent.font : _ref3$percent$font, | ||
_ref3$percent$transla = _ref3$percent.translate; | ||
_ref3$percent$transla = _ref3$percent$transla === void 0 ? defaultLegendOfPie.percent.translate : _ref3$percent$transla; | ||
var _ref3$percent$transla2 = _ref3$percent$transla.x, | ||
percentX = _ref3$percent$transla2 === void 0 ? defaultLegendOfPie.percent.translate.x : _ref3$percent$transla2, | ||
_ref3$percent$transla3 = _ref3$percent$transla.y, | ||
percentY = _ref3$percent$transla3 === void 0 ? defaultLegendOfPie.percent.translate.y : _ref3$percent$transla3, | ||
_ref3$value = _ref3.value; | ||
@@ -454,2 +478,8 @@ _ref3$value = _ref3$value === void 0 ? defaultLegendOfPie.value : _ref3$value; | ||
valueFont = _ref3$value$font === void 0 ? defaultLegendOfPie.value.font : _ref3$value$font, | ||
_ref3$value$translate = _ref3$value.translate; | ||
_ref3$value$translate = _ref3$value$translate === void 0 ? defaultLegendOfPie.value.translate : _ref3$value$translate; | ||
var _ref3$value$translate2 = _ref3$value$translate.x, | ||
valueX = _ref3$value$translate2 === void 0 ? defaultLegendOfPie.value.translate.x : _ref3$value$translate2, | ||
_ref3$value$translate3 = _ref3$value$translate.y, | ||
valueY = _ref3$value$translate3 === void 0 ? defaultLegendOfPie.value.translate.y : _ref3$value$translate3, | ||
_ref3$value$suffix = _ref3$value.suffix; | ||
@@ -545,3 +575,3 @@ _ref3$value$suffix = _ref3$value$suffix === void 0 ? defaultLegendOfPie.value.suffix : _ref3$value$suffix; | ||
suffix: "px" | ||
}, showRule())].concat((0, _toConsumableArray2["default"])((0, _index.textOverflow)(overflow))) | ||
}, showRule())].concat((0, _toConsumableArray2["default"])((0, _index.textOverflow)(overflow)), [(0, _index.translate)(nameX, nameY)]) | ||
}), _objectSpread(_objectSpread({}, showRule()), {}, { | ||
@@ -598,3 +628,3 @@ name: 'percent', | ||
markColorType: 'textColor' | ||
})] | ||
}), (0, _index.translate)(percentX, percentY)] | ||
}), _objectSpread(_objectSpread({}, showRule()), {}, { | ||
@@ -668,3 +698,3 @@ name: 'value', | ||
markColorType: 'textColor' | ||
})] | ||
}), (0, _index.translate)(valueX, valueY)] | ||
}), _objectSpread(_objectSpread({}, showRule()), {}, { | ||
@@ -671,0 +701,0 @@ name: 'layout', |
{ | ||
"name": "@easyv/config", | ||
"version": "1.2.14", | ||
"version": "1.2.15", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,3 +7,3 @@ const { | ||
} = require('.'); | ||
import { textOverflow, sc } from './index'; | ||
import { textOverflow, sc, translate } from './index'; | ||
@@ -378,3 +378,3 @@ const defaultFont = font({ | ||
iconGap: 5, | ||
name: { show: true, font: defaultFont, maxWidth:40 }, | ||
name: { show: true, font: defaultFont, maxWidth:40, translate:{ x:0, y:0 } }, | ||
percent: { | ||
@@ -387,2 +387,3 @@ show: true, | ||
font: defaultFont, | ||
translate:{ x:0, y:0 } | ||
}, | ||
@@ -395,2 +396,3 @@ value: { | ||
font: defaultFont, | ||
translate:{ x:0, y:0 }, | ||
suffix: { | ||
@@ -422,3 +424,7 @@ show: true, | ||
maxWidth = defaultLegendOfPie.name.maxWidth, | ||
overflow | ||
overflow, | ||
translate:{ | ||
x:nameX = defaultLegendOfPie.name.translate.x, | ||
y:nameY = defaultLegendOfPie.name.translate.y | ||
} = defaultLegendOfPie.name.translate | ||
} = defaultLegendOfPie.name, | ||
@@ -432,2 +438,6 @@ percent: { | ||
font: percentFont = defaultLegendOfPie.percent.font, | ||
translate:{ | ||
x:percentX = defaultLegendOfPie.percent.translate.x, | ||
y:percentY = defaultLegendOfPie.percent.translate.y | ||
} = defaultLegendOfPie.percent.translate | ||
} = defaultLegendOfPie.percent, | ||
@@ -440,2 +450,6 @@ value: { | ||
font: valueFont = defaultLegendOfPie.value.font, | ||
translate:{ | ||
x:valueX = defaultLegendOfPie.value.translate.x, | ||
y:valueY = defaultLegendOfPie.value.translate.y | ||
} = defaultLegendOfPie.value.translate, | ||
suffix: { | ||
@@ -530,3 +544,4 @@ show: showSuffix = defaultLegendOfPie.value.suffix.show, | ||
sc("maxWidth","宽度","number",maxWidth,{suffix:"px"},showRule()), | ||
...textOverflow(overflow) | ||
...textOverflow(overflow), | ||
translate(nameX, nameY) | ||
], | ||
@@ -590,2 +605,3 @@ }, | ||
}, | ||
translate(percentX, percentY) | ||
], | ||
@@ -676,2 +692,3 @@ }, | ||
}, | ||
translate(valueX, valueY) | ||
], | ||
@@ -678,0 +695,0 @@ }, |
406887
13647