提交 abc421bb 编写于 作者: P pissang

refact: use camel case in the moveOverlap value.

上级 0c264276
......@@ -411,10 +411,10 @@ class LabelManager {
const labelList = prepareLayoutList(this._labelList);
const labelsNeedsAdjustOnX = filter(labelList, function (item) {
return item.layoutOption.moveOverlap === 'shift-x';
return item.layoutOption.moveOverlap === 'shiftX';
});
const labelsNeedsAdjustOnY = filter(labelList, function (item) {
return item.layoutOption.moveOverlap === 'shift-y';
return item.layoutOption.moveOverlap === 'shiftY';
});
shiftLayoutOnX(labelsNeedsAdjustOnX, 0, width);
......
......@@ -954,13 +954,13 @@ export interface LabelLayoutOption {
* If move the overlapped label. If label is still overlapped after moved.
* It will determine if to hide this label with `hideOverlap` policy.
*
* shift-x/y will keep the order on x/y
* shuffle-x/y will move the label around the original position randomly.
* shiftX/Y will keep the order on x/y
* shuffleX/y will move the label around the original position randomly.
*/
moveOverlap?: 'shift-x'
| 'shift-y'
| 'shuffle-x'
| 'shuffle-y'
moveOverlap?: 'shiftX'
| 'shiftY'
| 'shuffleX'
| 'shuffleY'
/**
* If hide the overlapped label. It will be handled after move.
* @default 'none'
......
......@@ -457,7 +457,7 @@ under the License.
labelLayout: {
y: 20,
align: 'center',
moveOverlap: 'shift-x',
moveOverlap: 'shiftX',
hideOverlap: true
},
labelLine: {
......@@ -523,7 +523,7 @@ under the License.
},
labelLayout: {
x: 500,
moveOverlap: 'shift-y',
moveOverlap: 'shiftY',
// hideOverlap: true
},
labelLine: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册