ant-design-vue/components/vc-tooltip/placements.js

84 lines
1.5 KiB
JavaScript
Raw Normal View History

2018-01-11 10:53:51 +00:00
const autoAdjustOverflow = {
adjustX: 1,
adjustY: 1,
2019-01-12 03:33:27 +00:00
};
2018-01-11 10:53:51 +00:00
2019-01-12 03:33:27 +00:00
const targetOffset = [0, 0];
2018-01-11 10:53:51 +00:00
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,
},
2019-01-12 03:33:27 +00:00
};
2018-01-11 10:53:51 +00:00
2019-01-12 03:33:27 +00:00
export default placements;