Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.

Commit

Permalink
semicolon apocalypse
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Palmer committed Sep 19, 2013
1 parent ebd645c commit 8d1a325
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/d3.tip.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ d3.tip = function() {
html = d3_tip_html,
node = initNode(),
svg = null,
point = null;
point = null

function tip(vis) {
svg = getSVGNode(vis)
Expand Down Expand Up @@ -67,7 +67,7 @@ d3.tip = function() {
d3.selection.prototype.attr.apply(d3.select(node), args)
}

return tip;
return tip
}

// Public: Proxy style calls to the d3 tip container. Sets or gets a style value.
Expand All @@ -84,7 +84,7 @@ d3.tip = function() {
d3.selection.prototype.style.apply(d3.select(node), args)
}

return tip;
return tip
}

// Public: Set or get the direction of the tooltip
Expand All @@ -94,33 +94,35 @@ d3.tip = function() {
//
// Returns tip or direction
tip.direction = function(v) {
if (!arguments.length) return direction;
direction = v == null ? v : d3.functor(v);
return tip;
};
if (!arguments.length) return direction
direction = v == null ? v : d3.functor(v)

return tip
}

// Public: Sets or gets the offset of the tip
//
// v - Array of [x, y] offset
//
// Returns offset or
tip.offset = function(v) {
if (!arguments.length) return offset;
offset = v == null ? v : d3.functor(v);
return tip;
};
if (!arguments.length) return offset
offset = v == null ? v : d3.functor(v)

return tip
}

// Public: sets or gets the html value of the tooltip
//
// v - String value of the tip
//
// Returns html value or tip
tip.html = function(v) {
if (!arguments.length) return html;
if (!arguments.length) return html
html = v == null ? v : d3.functor(v)

return tip
};
}

function d3_tip_direction() { return 'n' }
function d3_tip_offset() { return [0, 0] }
Expand Down Expand Up @@ -275,5 +277,5 @@ d3.tip = function() {
return bbox
}

return tip;
return tip
};

0 comments on commit 8d1a325

Please sign in to comment.