File tree Expand file tree Collapse file tree 4 files changed +23
-18
lines changed Expand file tree Collapse file tree 4 files changed +23
-18
lines changed Original file line number Diff line number Diff line change 141
141
"jsx-quotes" : " error" ,
142
142
"key-spacing" : " off" ,
143
143
"keyword-spacing" : " error" ,
144
- "linebreak-style" : [ " error " , " unix " ] ,
144
+ "linebreak-style" : 0 ,
145
145
"line-comment-position" : " off" ,
146
146
"lines-around-comment" : " off" ,
147
147
"lines-around-directive" : " error" ,
Original file line number Diff line number Diff line change
1
+ * .css text eol =lf
2
+ * .js text eol =lf
Original file line number Diff line number Diff line change 7
7
8
8
function CustomTooltips ( tooltipModel ) {
9
9
// Add unique id if not exist
10
- if ( ! this . _chart . canvas . id ) {
11
- const _hex = 16
12
- const _multiply = 0x10000
13
- const _idMaker = ( ) => ( ( 1 + Math . random ( ) ) * _multiply | 0 ) . toString ( _hex )
14
- const _canvasId = `_canvas${ _idMaker ( ) + _idMaker ( ) } `
15
- this . _chart . canvas . id = this . _chart . canvas . id || _canvasId
10
+ const _setCanvasId = ( ) => {
11
+ const _idMaker = ( ) => {
12
+ const _hex = 16
13
+ const _multiplier = 0x10000
14
+ return ( ( 1 + Math . random ( ) ) * _multiplier | 0 ) . toString ( _hex )
15
+ }
16
+ const _canvasId = `_canvas-${ _idMaker ( ) + _idMaker ( ) } `
17
+ this . _chart . canvas . id = _canvasId
18
+ return _canvasId
16
19
}
17
20
18
21
const ClassName = {
@@ -32,7 +35,7 @@ function CustomTooltips(tooltipModel) {
32
35
const Selector = {
33
36
DIV : 'div' ,
34
37
SPAN : 'span' ,
35
- TOOLTIP : `${ this . _chart . canvas . id } -tooltip`
38
+ TOOLTIP : `${ this . _chart . canvas . id || _setCanvasId ( ) } -tooltip`
36
39
}
37
40
38
41
let tooltip = document . getElementById ( Selector . TOOLTIP )
Original file line number Diff line number Diff line change 43
43
"watch-js" : " nodemon --ignore dist/ -e js -x npm run js"
44
44
},
45
45
"devDependencies" : {
46
- "@babel/cli" : " 7.0.0-beta.42 " ,
47
- "@babel/core" : " 7.0.0-beta.42 " ,
48
- "@babel/plugin-proposal-object-rest-spread" : " ^7.0.0-beta.42 " ,
49
- "@babel/preset-env" : " 7.0.0-beta.42 " ,
50
- "babel-eslint" : " ^8.2.2 " ,
51
- "babel-plugin-istanbul" : " ^4.1.5 " ,
46
+ "@babel/cli" : " 7.0.0-beta.46 " ,
47
+ "@babel/core" : " 7.0.0-beta.46 " ,
48
+ "@babel/plugin-proposal-object-rest-spread" : " ^7.0.0-beta.46 " ,
49
+ "@babel/preset-env" : " 7.0.0-beta.46 " ,
50
+ "babel-eslint" : " ^8.2.3 " ,
51
+ "babel-plugin-istanbul" : " ^4.1.6 " ,
52
52
"babel-plugin-transform-es2015-modules-strip" : " ^0.1.1" ,
53
53
"babel-plugin-transform-object-rest-spread" : " ^6.26.0" ,
54
54
"cross-env" : " ^5.1.4" ,
55
- "eslint" : " ^4.16.0 " ,
56
- "eslint-plugin-compat" : " ^2.1 .0" ,
57
- "nodemon" : " ^1.12.1 " ,
55
+ "eslint" : " ^4.19.1 " ,
56
+ "eslint-plugin-compat" : " ^2.2 .0" ,
57
+ "nodemon" : " ^1.17.3 " ,
58
58
"npm-run-all" : " ^4.1.2" ,
59
- "uglify-js" : " ^3.3.8 "
59
+ "uglify-js" : " ^3.3.22 "
60
60
},
61
61
"peerDependencies" : {
62
62
"chart.js" : " ^2.7.2"
You can’t perform that action at this time.
0 commit comments