UNPKG

@antv/x6

Version:

JavaScript diagramming library that uses SVG and HTML for rendering

18 lines (13 loc) 458 B
import { Dom } from '../../common' import { Config } from '../../config' import type { HighlighterDefinition } from './index' export type OpacityHighlighterOptions = {} const className = Config.prefix('highlight-opacity') export const opacity: HighlighterDefinition<OpacityHighlighterOptions> = { highlight(cellView, magnet) { Dom.addClass(magnet, className) }, unhighlight(cellView, magnetEl) { Dom.removeClass(magnetEl, className) }, }