You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/vc-tooltip/placements.js

84 lines
1.5 KiB

7 years ago
const autoAdjustOverflow = {
adjustX: 1,
adjustY: 1,
};
7 years ago
const targetOffset = [0, 0];
7 years ago
export const placements = {
left: {
points: ['cr', 'cl'],
overflow: autoAdjustOverflow,
offset: [-4, 0],
targetOffset,
},
right: {
points: ['cl', 'cr'],
overflow: autoAdjustOverflow,
offset: [4, 0],
targetOffset,
},
top: {
points: ['bc', 'tc'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset,
},
bottom: {
points: ['tc', 'bc'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset,
},
topLeft: {
points: ['bl', 'tl'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset,
},
leftTop: {
points: ['tr', 'tl'],
overflow: autoAdjustOverflow,
offset: [-4, 0],
targetOffset,
},
topRight: {
points: ['br', 'tr'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset,
},
rightTop: {
points: ['tl', 'tr'],
overflow: autoAdjustOverflow,
offset: [4, 0],
targetOffset,
},
bottomRight: {
points: ['tr', 'br'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset,
},
rightBottom: {
points: ['bl', 'br'],
overflow: autoAdjustOverflow,
offset: [4, 0],
targetOffset,
},
bottomLeft: {
points: ['tl', 'bl'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset,
},
leftBottom: {
points: ['br', 'bl'],
overflow: autoAdjustOverflow,
offset: [-4, 0],
targetOffset,
},
};
7 years ago
export default placements;