提交 713d665d 编写于 作者: P pah100

Merge branch 'master' of https://github.com/ecomfe/echarts

...@@ -10,6 +10,8 @@ define(function (require) { ...@@ -10,6 +10,8 @@ define(function (require) {
function fixLayoutWithLineWidth(layout, lineWidth) { function fixLayoutWithLineWidth(layout, lineWidth) {
var signX = layout.width > 0 ? 1 : -1; var signX = layout.width > 0 ? 1 : -1;
var signY = layout.height > 0 ? 1 : -1; var signY = layout.height > 0 ? 1 : -1;
// In case width or height are too small.
lineWidth = Math.min(lineWidth, Math.abs(layout.width), Math.abs(layout.height));
layout.x += signX * lineWidth / 2; layout.x += signX * lineWidth / 2;
layout.y += signY * lineWidth / 2; layout.y += signY * lineWidth / 2;
layout.width -= signX * lineWidth; layout.width -= signX * lineWidth;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册