Skip to content

Commit dcc1c5f

Browse files
committed
Merge branch 'master' into develop
2 parents 9e0793a + 15c5ace commit dcc1c5f

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![License: MIT][mit-image]][mit-url] [![NPM Package][npm-image]][npm-url] [![Github Actions][github-actions-image]][github-actions-url]
44

5-
This is a maintained fork of https://github.com/benfred/venn.js.
5+
This is a maintained fork of [https://github.com/benfred/venn.js](https://github.com/benfred/venn.js).
66

77
A javascript library for laying out area proportional venn and euler diagrams.
88

@@ -98,16 +98,16 @@ d3.selectAll('input').on('change', function () {
9898

9999
##### Making the diagram interactive
100100

101-
Making the diagram interactive is basically the same idea as changing the style: just add event listeners to the elements in the venn diagram. To change the text size and circle colours on mouseover:
101+
Making the diagram interactive is basically the same idea as changing the style: just add event listeners to the elements in the venn diagram. To change the text size and circle colours on mouseenter:
102102

103103
```js
104104
d3.selectAll('#rings .venn-circle')
105-
.on('mouseover', function () {
105+
.on('mouseenter', function () {
106106
const node = d3.select(this).transition();
107107
node.select('path').style('fill-opacity', 0.2);
108108
node.select('text').style('font-weight', '100').style('font-size', '36px');
109109
})
110-
.on('mouseout', function () {
110+
.on('mouseleave', function () {
111111
const node = d3.select(this).transition();
112112
node.select('path').style('fill-opacity', 0);
113113
node.select('text').style('font-weight', '100').style('font-size', '24px');
@@ -139,10 +139,10 @@ div.datum(sets).call(venn.VennDiagram());
139139
// add a tooltip
140140
const tooltip = d3.select('body').append('div').attr('class', 'venntooltip');
141141

142-
// add listeners to all the groups to display tooltip on mouseover
142+
// add listeners to all the groups to display tooltip on mouseenter
143143
div
144144
.selectAll('g')
145-
.on('mouseover', function (d) {
145+
.on('mouseenter', function (d) {
146146
// sort all the areas relative to the current item
147147
venn.sortAreas(div, d);
148148

@@ -163,7 +163,7 @@ div
163163
tooltip.style('left', d3.event.pageX + 'px').style('top', d3.event.pageY - 28 + 'px');
164164
})
165165

166-
.on('mouseout', function (d) {
166+
.on('mouseleave', function (d) {
167167
tooltip.transition().duration(400).style('opacity', 0);
168168
const selection = d3.select(this).transition('tooltip').duration(400);
169169
selection

examples/interactive.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
.style('font-weight', '100');
4545

4646
d3.selectAll('#rings .venn-circle')
47-
.on('mouseover', function (d, i) {
47+
.on('mouseenter', function (d, i) {
4848
var node = d3.select(this).transition();
4949
node.select('path').style('fill-opacity', 0.2);
5050
node.select('text').style('font-weight', '100').style('font-size', '36px');
5151
})
52-
.on('mouseout', function (d, i) {
52+
.on('mouseleave', function (d, i) {
5353
var node = d3.select(this).transition();
5454
node.select('path').style('fill-opacity', 0);
5555
node.select('text').style('font-weight', '100').style('font-size', '24px');

examples/intersection_tooltip.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
div
4848
.selectAll('g')
49-
.on('mouseover', function (d, i) {
49+
.on('mouseenter', function (d, i) {
5050
// sort all the areas relative to the current item
5151
venn.sortAreas(div, d);
5252

@@ -66,7 +66,7 @@
6666
tooltip.style('left', d3.event.pageX + 'px').style('top', d3.event.pageY - 28 + 'px');
6767
})
6868

69-
.on('mouseout', function (d, i) {
69+
.on('mouseleave', function (d, i) {
7070
tooltip.transition().duration(400).style('opacity', 0);
7171
var selection = d3.select(this).transition('tooltip').duration(400);
7272
selection

0 commit comments

Comments
 (0)