MCPcopy Index your code
hub / github.com/bqplot/bqplot / mouseover_handler

Method mouseover_handler

js/src/Map.ts:127–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125 }
126
127 mouseover_handler() {
128 if (!this.model.get('hover_highlight')) {
129 return;
130 }
131 const el = d3.select(d3GetEvent().target);
132 if (this.is_hover_element(el)) {
133 const data: any = el.data()[0];
134 const idx = this.model.get('selected') || [];
135 const select = Array.from(idx);
136 const node = this.highlight_g.append(() => {
137 return el.node().cloneNode(true);
138 });
139 node.classed('hovered', true);
140 node.classed('event_layer', false);
141
142 if (
143 this.validate_color(this.model.get('hovered_styles').hovered_stroke) &&
144 select.indexOf(data.id) === -1
145 ) {
146 node
147 .style('stroke', this.model.get('hovered_styles').hovered_stroke)
148 .style(
149 'stroke-width',
150 this.model.get('hovered_styles').hovered_stroke_width
151 );
152 }
153 if (
154 this.validate_color(this.model.get('hovered_styles').hovered_fill) &&
155 select.indexOf(data.id) === -1
156 ) {
157 node.style('fill-opacity', 1.0).style('fill', () => {
158 return this.model.get('hovered_styles').hovered_fill;
159 });
160 }
161 }
162 }
163
164 mouseout_handler() {
165 if (!this.model.get('hover_highlight')) {

Callers 1

process_hoverMethod · 0.95

Calls 2

validate_colorMethod · 0.95
d3GetEventFunction · 0.90

Tested by

no test coverage detected