amis-rpc-design/node_modules/rc-tooltip/lib/placements.js

92 lines
2.0 KiB
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.placements = exports.default = void 0;
var autoAdjustOverflowTopBottom = {
shiftX: 64,
adjustY: 1
};
var autoAdjustOverflowLeftRight = {
adjustX: 1,
shiftY: true
};
var targetOffset = [0, 0];
var placements = {
left: {
points: ['cr', 'cl'],
overflow: autoAdjustOverflowLeftRight,
offset: [-4, 0],
targetOffset: targetOffset
},
right: {
points: ['cl', 'cr'],
overflow: autoAdjustOverflowLeftRight,
offset: [4, 0],
targetOffset: targetOffset
},
top: {
points: ['bc', 'tc'],
overflow: autoAdjustOverflowTopBottom,
offset: [0, -4],
targetOffset: targetOffset
},
bottom: {
points: ['tc', 'bc'],
overflow: autoAdjustOverflowTopBottom,
offset: [0, 4],
targetOffset: targetOffset
},
topLeft: {
points: ['bl', 'tl'],
overflow: autoAdjustOverflowTopBottom,
offset: [0, -4],
targetOffset: targetOffset
},
leftTop: {
points: ['tr', 'tl'],
overflow: autoAdjustOverflowLeftRight,
offset: [-4, 0],
targetOffset: targetOffset
},
topRight: {
points: ['br', 'tr'],
overflow: autoAdjustOverflowTopBottom,
offset: [0, -4],
targetOffset: targetOffset
},
rightTop: {
points: ['tl', 'tr'],
overflow: autoAdjustOverflowLeftRight,
offset: [4, 0],
targetOffset: targetOffset
},
bottomRight: {
points: ['tr', 'br'],
overflow: autoAdjustOverflowTopBottom,
offset: [0, 4],
targetOffset: targetOffset
},
rightBottom: {
points: ['bl', 'br'],
overflow: autoAdjustOverflowLeftRight,
offset: [4, 0],
targetOffset: targetOffset
},
bottomLeft: {
points: ['tl', 'bl'],
overflow: autoAdjustOverflowTopBottom,
offset: [0, 4],
targetOffset: targetOffset
},
leftBottom: {
points: ['br', 'bl'],
overflow: autoAdjustOverflowLeftRight,
offset: [-4, 0],
targetOffset: targetOffset
}
};
exports.placements = placements;
var _default = placements;
exports.default = _default;