fixes #217, quick merge please

This commit is contained in:
Marcin Chwedziak 2013-04-10 22:00:50 +02:00
parent 347533c8dd
commit a87c47296c
3 changed files with 3 additions and 10 deletions

View File

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

View File

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

2
morris.min.js vendored

File diff suppressed because one or more lines are too long