Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
options.zIndex = 0; // toolip 背景框不可遮盖住 geom,防止用户配置了 crosshairs
}
options.visible = false;
// @2018-09-13 by blue.lb 如果设置shared为false不需要指定position
// if (options.shared === false && Util.isNil(options.position)) {
// options.position = 'top';
// }
let tooltip;
if (options.type === 'mini') {
options.crosshairs = false;
// this.options.shared = false;
options.position = 'top';
tooltip = new Tooltip.Mini(options);
} else if (options.useHtml) {
tooltip = new Tooltip.Html(options);
} else {
tooltip = new Tooltip.Canvas(options);
}
self.tooltip = tooltip;
const triggerEvent = self._getTriggerEvent();
const tooltipContainer = tooltip.get('container');
if (!tooltip.get('enterable') && triggerEvent === 'plotmove') { // 鼠标不允许进入 tooltip 容器
if (tooltipContainer) {
tooltipContainer.onmousemove = e => {
// 避免 tooltip 频繁闪烁
const eventObj = self._normalizeEvent(e);
chart.emit(triggerEvent, eventObj);
};
}
}