Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
c3-closed
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
charts
c3-closed
Commits
e51a75a2
Commit
e51a75a2
authored
Nov 27, 2014
by
Masayuki Tanaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix this context for mouse events
parent
e2911205
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
c3.js
c3.js
+6
-6
c3.min.js
c3.min.js
+0
-0
drag.js
src/drag.js
+2
-2
interaction.js
src/interaction.js
+4
-4
No files found.
c3.js
View file @
e51a75a2
...
...
@@ -2271,7 +2271,7 @@
// Call event handler
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
shape
+
'-'
+
index
).
each
(
function
(
d
)
{
config
.
data_onmouseover
.
call
(
$$
,
d
);
config
.
data_onmouseover
.
call
(
$$
.
api
,
d
);
});
})
.
on
(
'mouseout'
,
function
(
d
)
{
...
...
@@ -2284,7 +2284,7 @@
$$
.
unexpandBars
();
// Call event handler
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
shape
+
'-'
+
index
).
each
(
function
(
d
)
{
config
.
data_onmouseout
.
call
(
$$
,
d
);
config
.
data_onmouseout
.
call
(
$$
.
api
,
d
);
});
})
.
on
(
'mousemove'
,
function
(
d
)
{
...
...
@@ -2399,7 +2399,7 @@
closest
=
$$
.
findClosestFromTargets
(
targetsToShow
,
mouse
);
if
(
$$
.
mouseover
&&
(
!
closest
||
closest
.
id
!==
$$
.
mouseover
.
id
))
{
config
.
data_onmouseout
.
call
(
$$
,
$$
.
mouseover
);
config
.
data_onmouseout
.
call
(
$$
.
api
,
$$
.
mouseover
);
$$
.
mouseover
=
undefined
;
}
...
...
@@ -2433,7 +2433,7 @@
if
(
$$
.
isBarType
(
closest
.
id
)
||
$$
.
dist
(
closest
,
mouse
)
<
100
)
{
$$
.
svg
.
select
(
'.'
+
CLASS
.
eventRect
).
style
(
'cursor'
,
'pointer'
);
if
(
!
$$
.
mouseover
)
{
config
.
data_onmouseover
.
call
(
$$
,
closest
);
config
.
data_onmouseover
.
call
(
$$
.
api
,
closest
);
$$
.
mouseover
=
closest
;
}
}
...
...
@@ -4949,7 +4949,7 @@
.
attr
(
'class'
,
CLASS
.
dragarea
)
.
style
(
'opacity'
,
0.1
);
$$
.
dragging
=
true
;
$$
.
config
.
data_ondragstart
(
);
$$
.
config
.
data_ondragstart
.
call
(
$$
.
api
);
};
c3_chart_internal_fn
.
dragend
=
function
()
{
...
...
@@ -4963,7 +4963,7 @@
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
shape
)
.
classed
(
CLASS
.
INCLUDED
,
false
);
$$
.
dragging
=
false
;
$$
.
config
.
data_ondragend
(
);
$$
.
config
.
data_ondragend
.
call
(
$$
.
api
);
};
...
...
c3.min.js
View file @
e51a75a2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/drag.js
View file @
e51a75a2
...
...
@@ -65,7 +65,7 @@ c3_chart_internal_fn.dragstart = function (mouse) {
.
attr
(
'class'
,
CLASS
.
dragarea
)
.
style
(
'opacity'
,
0.1
);
$$
.
dragging
=
true
;
$$
.
config
.
data_ondragstart
(
);
$$
.
config
.
data_ondragstart
.
call
(
$$
.
api
);
};
c3_chart_internal_fn
.
dragend
=
function
()
{
...
...
@@ -79,6 +79,6 @@ c3_chart_internal_fn.dragend = function () {
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
shape
)
.
classed
(
CLASS
.
INCLUDED
,
false
);
$$
.
dragging
=
false
;
$$
.
config
.
data_ondragend
(
);
$$
.
config
.
data_ondragend
.
call
(
$$
.
api
);
};
src/interaction.js
View file @
e51a75a2
...
...
@@ -142,7 +142,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) {
// Call event handler
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
shape
+
'-'
+
index
).
each
(
function
(
d
)
{
config
.
data_onmouseover
.
call
(
$$
,
d
);
config
.
data_onmouseover
.
call
(
$$
.
api
,
d
);
});
})
.
on
(
'mouseout'
,
function
(
d
)
{
...
...
@@ -155,7 +155,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) {
$$
.
unexpandBars
();
// Call event handler
$$
.
main
.
selectAll
(
'.'
+
CLASS
.
shape
+
'-'
+
index
).
each
(
function
(
d
)
{
config
.
data_onmouseout
.
call
(
$$
,
d
);
config
.
data_onmouseout
.
call
(
$$
.
api
,
d
);
});
})
.
on
(
'mousemove'
,
function
(
d
)
{
...
...
@@ -270,7 +270,7 @@ c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter)
closest
=
$$
.
findClosestFromTargets
(
targetsToShow
,
mouse
);
if
(
$$
.
mouseover
&&
(
!
closest
||
closest
.
id
!==
$$
.
mouseover
.
id
))
{
config
.
data_onmouseout
.
call
(
$$
,
$$
.
mouseover
);
config
.
data_onmouseout
.
call
(
$$
.
api
,
$$
.
mouseover
);
$$
.
mouseover
=
undefined
;
}
...
...
@@ -304,7 +304,7 @@ c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter)
if
(
$$
.
isBarType
(
closest
.
id
)
||
$$
.
dist
(
closest
,
mouse
)
<
100
)
{
$$
.
svg
.
select
(
'.'
+
CLASS
.
eventRect
).
style
(
'cursor'
,
'pointer'
);
if
(
!
$$
.
mouseover
)
{
config
.
data_onmouseover
.
call
(
$$
,
closest
);
config
.
data_onmouseover
.
call
(
$$
.
api
,
closest
);
$$
.
mouseover
=
closest
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment