"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BUILD_IN_SVG_ICON = exports.TOOLBAR_CSS = void 0;
exports.parsePositionToStyle = parsePositionToStyle;
/**
* 解析 toolbar 的 position 为位置样式。
*
* Parse the position of the toolbar into position style.
* @param position - position
* @returns style
*/
function parsePositionToStyle(position) {
const style = {
top: 'unset',
right: 'unset',
bottom: 'unset',
left: 'unset',
};
const directions = position.split('-');
directions.forEach((d) => {
style[d] = '8px';
});
style.flexDirection = position.startsWith('top') || position.startsWith('bottom') ? 'row' : 'column';
return style;
}
/**
* 内置默认的 toolbar 的 CSS 样式。
*/
exports.TOOLBAR_CSS = `
.g6-toolbar {
position: absolute;
z-index: 100;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
border-radius: 4px;
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1);
opacity: 0.65;
}
.g6-toolbar .g6-toolbar-item {
display: inline-block;
width: 16px;
height: 16px;
padding: 4px;
cursor: pointer;
box-sizing: content-box;
}
.g6-toolbar .g6-toolbar-item:hover {
background-color: #f0f0f0;
}
.g6-toolbar .g6-toolbar-item svg {
display: inline-block;
width: 100%;
height: 100%;
pointer-events: none;
}
`;
exports.BUILD_IN_SVG_ICON = `
`;
//# sourceMappingURL=util.js.map