Merge pull request #218 from tiraeth/217-donut-click

fixes #217, quick merge please
This commit is contained in:
Olly Smith 2013-04-13 13:59:16 -07:00
commit 80453b95b5
3 changed files with 3 additions and 10 deletions

View File

@ -98,8 +98,7 @@ class Morris.Donut extends Morris.EventEmitter
# @private
click: (idx) =>
if typeof idx is 'number' then segment = @segments[idx] else segment = idx
@fire 'click', segment.idx, segment.data
@fire 'click', idx, @data[idx]
# Select the segment at the given index.
select: (idx) =>

View File

@ -1563,13 +1563,7 @@
};
Donut.prototype.click = function(idx) {
var segment;
if (typeof idx === 'number') {
segment = this.segments[idx];
} else {
segment = idx;
}
return this.fire('click', segment.idx, segment.data);
return this.fire('click', idx, this.data[idx]);
};
Donut.prototype.select = function(idx) {

2
morris.min.js vendored

File diff suppressed because one or more lines are too long