提交 29738494 编写于 作者: L lang

Pin symbol text position fix

上级 b358ab0d
......@@ -185,7 +185,7 @@ define(function (require) {
// Set host model for tooltip
// FIXME
mlData.line.eachItemGraphicEl(function (el, idx) {
el.eachChild(function (child) {
el.traverse(function (child) {
child.hostModel = mlModel;
});
});
......
......@@ -68,15 +68,6 @@ define(function(require) {
height: 0
},
beforeBrush: function () {
var style = this.style;
if (style.textPosition === 'inside') {
style.textPosition = ['50%', '35%'];
style.textAlign = 'center';
style.textBaseline = 'middle';
}
},
buildPath: function (path, shape) {
var x = shape.x;
var y = shape.y;
......@@ -256,6 +247,17 @@ define(function(require) {
height: 0
},
beforeBrush: function () {
var style = this.style;
var shape = this.shape;
// FIXME
if (shape.symbolType === 'pin' && style.textPosition === 'inside') {
style.textPosition = ['50%', '40%'];
style.textAlign = 'center';
style.textBaseline = 'middle';
}
},
buildPath: function (ctx, shape) {
var proxySymbol = symbolBuildProxies[shape.symbolType];
if (proxySymbol) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册