1
1
import React from 'react'
2
2
import DATGlobe from '../include/globe.js'
3
3
import LocalStorageMixin from 'react-localstorage'
4
- import Debug from 'debug'
4
+ import debug from 'debug'
5
5
import _ from 'lodash'
6
6
// Displays webgl warning message if not present
7
7
require ( '../include/Detector.js' )
8
8
9
- const debug = Debug ( 'ipfs:pages:connections ')
9
+ const log = debug ( 'globe ')
10
10
11
11
export default React . createClass ( {
12
12
displayName : 'Globe' ,
@@ -31,7 +31,7 @@ export default React.createClass({
31
31
32
32
componentDidUpdate : function ( prevProps , prevState ) {
33
33
if ( prevState . theme !== this . state . theme ) {
34
- debug ( 'disposing globe' )
34
+ log ( 'disposing globe' )
35
35
this . globe && this . globe . dispose ( )
36
36
this . createGlobe ( )
37
37
}
@@ -44,7 +44,7 @@ export default React.createClass({
44
44
if ( ! this . globe || ! data . length ) return
45
45
// TODO find difference between old points and new points
46
46
// and only add the new ones. THREE might be doing this internally.
47
- debug ( 'adding %d points, %j' , data . length , data )
47
+ log ( 'adding %d points, %j' , data . length , data )
48
48
this . globe . addData ( data , { format : 'magnitude' } )
49
49
this . globe . createPoints ( )
50
50
} ,
@@ -54,7 +54,7 @@ export default React.createClass({
54
54
var texturePath = window . location . pathname + slash + 'img/'
55
55
if ( this . state . theme === 'dark' ) texturePath += 'dark-'
56
56
57
- debug ( 'mounting globe' )
57
+ log ( 'mounting globe' )
58
58
this . globe = new DATGlobe ( this . refs . globe , {
59
59
imgDir : texturePath
60
60
} )
0 commit comments