@@ -526,11 +526,11 @@ Graph3d.prototype.create = function () {
526
526
} ;
527
527
// TODO: these events are never cleaned up... can give a 'memory leakage'
528
528
529
- util . addEventListener ( this . frame . canvas , "mousedown" , onmousedown ) ;
530
- util . addEventListener ( this . frame . canvas , "touchstart" , ontouchstart ) ;
531
- util . addEventListener ( this . frame . canvas , "mousewheel" , onmousewheel ) ;
532
- util . addEventListener ( this . frame . canvas , "mousemove" , ontooltip ) ;
533
- util . addEventListener ( this . frame . canvas , "click" , onclick ) ;
529
+ this . frame . canvas . addEventListener ( "mousedown" , onmousedown ) ;
530
+ this . frame . canvas . addEventListener ( "touchstart" , ontouchstart ) ;
531
+ this . frame . canvas . addEventListener ( "mousewheel" , onmousewheel ) ;
532
+ this . frame . canvas . addEventListener ( "mousemove" , ontooltip ) ;
533
+ this . frame . canvas . addEventListener ( "click" , onclick ) ;
534
534
535
535
// add the new graph to the container element
536
536
this . containerElement . appendChild ( this . frame ) ;
@@ -2079,8 +2079,8 @@ Graph3d.prototype._onMouseDown = function (event) {
2079
2079
this . onmouseup = function ( event ) {
2080
2080
me . _onMouseUp ( event ) ;
2081
2081
} ;
2082
- util . addEventListener ( document , "mousemove" , me . onmousemove ) ;
2083
- util . addEventListener ( document , "mouseup" , me . onmouseup ) ;
2082
+ document . addEventListener ( "mousemove" , me . onmousemove ) ;
2083
+ document . addEventListener ( "mouseup" , me . onmouseup ) ;
2084
2084
util . preventDefault ( event ) ;
2085
2085
} ;
2086
2086
@@ -2253,8 +2253,8 @@ Graph3d.prototype._onTouchStart = function (event) {
2253
2253
this . ontouchend = function ( event ) {
2254
2254
me . _onTouchEnd ( event ) ;
2255
2255
} ;
2256
- util . addEventListener ( document , "touchmove" , me . ontouchmove ) ;
2257
- util . addEventListener ( document , "touchend" , me . ontouchend ) ;
2256
+ document . addEventListener ( "touchmove" , me . ontouchmove ) ;
2257
+ document . addEventListener ( "touchend" , me . ontouchend ) ;
2258
2258
2259
2259
this . _onMouseDown ( event ) ;
2260
2260
} ;
0 commit comments