Skip to content
This repository was archived by the owner on Jul 29, 2019. It is now read-only.

Small fix on ref usage in DataGroup #3198

Merged
merged 1 commit into from
Jun 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/graph3d/DataGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ function DataGroup() {
* @param {Number} style Style Number
*/
DataGroup.prototype.initializeData = function(graph3d, rawData, style) {
var me = this;

// unsubscribe from the dataTable
if (this.dataSet) {
this.dataSet.off('*', this._onChange);
Expand Down Expand Up @@ -65,8 +63,9 @@ DataGroup.prototype.initializeData = function(graph3d, rawData, style) {
this.dataTable = data;

// subscribe to changes in the dataset
var me = this;
this._onChange = function () {
me.setData(me.dataSet);
graph3d.setData(me.dataSet);
};
this.dataSet.on('*', this._onChange);

Expand Down