[Pkg-javascript-commits] [d3-tip.js] 07/17: Enabled `camelcase` ESLint rule
Sunil Mohan Adapa
sunilmohan-guest at moszumanska.debian.org
Thu Dec 8 10:37:11 UTC 2016
This is an automated email from the git hooks/post-receive script.
sunilmohan-guest pushed a commit to branch upstream
in repository d3-tip.js.
commit 138b89299e89036eef72202e39f8300b7530b39f
Author: Tim van der Horst <tim.vanderhorst at sportsmedglobal.com>
Date: Thu Aug 25 09:08:03 2016 +1000
Enabled `camelcase` ESLint rule
---
.eslintrc.yaml | 1 -
index.js | 52 ++++++++++++++++++++++++++--------------------------
2 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/.eslintrc.yaml b/.eslintrc.yaml
index cf80e67..765cda5 100644
--- a/.eslintrc.yaml
+++ b/.eslintrc.yaml
@@ -63,5 +63,4 @@
# with the existing code style
vars-on-top: 0
one-var: 0
- camelcase: 0
no-use-before-define: 0
diff --git a/index.js b/index.js
index 8c1add3..121bffd 100644
--- a/index.js
+++ b/index.js
@@ -23,9 +23,9 @@
//
// Returns a tip
return function() {
- var direction = d3_tip_direction,
- offset = d3_tip_offset,
- html = d3_tip_html,
+ var direction = d3TipDirection,
+ offset = d3TipOffset,
+ html = d3TipHTML,
node = initNode(),
svg = null,
point = null,
@@ -60,7 +60,7 @@
.style('opacity', 1).style('pointer-events', 'all')
while (i--) nodel.classed(directions[i], false)
- coords = direction_callbacks.get(dir).apply(this)
+ coords = directionCallbacks.get(dir).apply(this)
nodel.classed(dir, true)
.style('top', (coords.top + poffset[0]) + scrollTop + 'px')
.style('left', (coords.left + poffset[1]) + scrollLeft + 'px')
@@ -159,23 +159,23 @@
return tip
}
- function d3_tip_direction() { return 'n' }
- function d3_tip_offset() { return [0, 0] }
- function d3_tip_html() { return ' ' }
-
- var direction_callbacks = d3.map({
- n: direction_n,
- s: direction_s,
- e: direction_e,
- w: direction_w,
- nw: direction_nw,
- ne: direction_ne,
- sw: direction_sw,
- se: direction_se
+ function d3TipDirection() { return 'n' }
+ function d3TipOffset() { return [0, 0] }
+ function d3TipHTML() { return ' ' }
+
+ var directionCallbacks = d3.map({
+ n: directionNorth,
+ s: directionSouth,
+ e: directionEast,
+ w: directionWest,
+ nw: directionNorthWest,
+ ne: directionNorthEast,
+ sw: directionSouthWest,
+ se: directionSouthEast
}),
- directions = direction_callbacks.keys()
+ directions = directionCallbacks.keys()
- function direction_n() {
+ function directionNorth() {
var bbox = getScreenBBox()
return {
top: bbox.n.y - node.offsetHeight,
@@ -183,7 +183,7 @@
}
}
- function direction_s() {
+ function directionSouth() {
var bbox = getScreenBBox()
return {
top: bbox.s.y,
@@ -191,7 +191,7 @@
}
}
- function direction_e() {
+ function directionEast() {
var bbox = getScreenBBox()
return {
top: bbox.e.y - node.offsetHeight / 2,
@@ -199,7 +199,7 @@
}
}
- function direction_w() {
+ function directionWest() {
var bbox = getScreenBBox()
return {
top: bbox.w.y - node.offsetHeight / 2,
@@ -207,7 +207,7 @@
}
}
- function direction_nw() {
+ function directionNorthWest() {
var bbox = getScreenBBox()
return {
top: bbox.nw.y - node.offsetHeight,
@@ -215,7 +215,7 @@
}
}
- function direction_ne() {
+ function directionNorthEast() {
var bbox = getScreenBBox()
return {
top: bbox.ne.y - node.offsetHeight,
@@ -223,7 +223,7 @@
}
}
- function direction_sw() {
+ function directionSouthWest() {
var bbox = getScreenBBox()
return {
top: bbox.sw.y,
@@ -231,7 +231,7 @@
}
}
- function direction_se() {
+ function directionSouthEast() {
var bbox = getScreenBBox()
return {
top: bbox.se.y,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/d3-tip.js.git
More information about the Pkg-javascript-commits
mailing list