Skip to content

Commit 5254c72

Browse files
author
Jelte Lagendijk
committed
Remove customTooltip node (not used), fix #68
1 parent 413a34b commit 5254c72

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/ChartJS/widgets/Core.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ define([
5959
_currentContext: null,
6060
_addedToBody: false,
6161

62+
_tooltipNode: null,
63+
6264
startup: function () {
6365
// Uncomment line to start debugging
6466
//logger.level(logger.DEBUG);
@@ -91,15 +93,14 @@ define([
9193

9294
this._activeDatasets = [];
9395

94-
if (!dojoDom.byId("chartjsTooltip")) {
95-
domNode = domConstruct.toDom(_chartJSTooltipTemplate);
96-
domConstruct.place(domNode, win.body());
97-
}
96+
// if (!dojoDom.byId("chartjsTooltip")) {
97+
// this._tooltipNode = domConstruct.toDom(_chartJSTooltipTemplate);
98+
// domConstruct.place(this._tooltipNode, win.body());
99+
// }
98100

99101
this.connect(this.mxform, "resize", lang.hitch(this, function () {
100102
this._resize();
101103
}));
102-
103104
},
104105

105106
datasetAdd: function (dataset, datapoints) {
@@ -201,6 +202,10 @@ define([
201202
if (this._handle !== null) {
202203
mx.data.unsubscribe(this._handle);
203204
}
205+
206+
if (this._tooltipNode) {
207+
domConstruct.destroy(this._tooltipNode);
208+
}
204209
},
205210

206211
customTooltip: function (tooltip) {

test/widgets/ChartJS.mpk

37 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)