novus-nvd3-rails 1.8.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 214bddadbc3c67f5694e6bf12399f71965570282
4
- data.tar.gz: b4e5987d565187578601e6bd2dfbbcfe351a0a39
3
+ metadata.gz: 0e4c2bc702e0491d15d744cdd945d034c41638c1
4
+ data.tar.gz: 8bd4d72443fae2d04087838a8557782704536249
5
5
  SHA512:
6
- metadata.gz: 7262da6f03e8ee116e99b3451bd0d263d6e112e6cb706d18ab7ea5f03e5771ff8089489854fc4ce0a61b6d3b5818bddeb86e0acb9c48bf0e7afdc7b6b376427f
7
- data.tar.gz: 053990069342853724a253484212d9d3585c27f8825f8cc8a40f3956ed28c14bb238732e5fdb4308c361f80176c05a37320a711ed84f3d8a7930627ab84a801d
6
+ metadata.gz: 1965c13fd53a1bedcbcd48e94938183049d2ae6bb9fc4353b1af2eda92735aa2b77c053d5411361e23fa69114b924b816246356eb49ec4e4ef2c4ca63955f67a
7
+ data.tar.gz: efc641590e3d734b1068ed708384aeb21d8d377f371abf4afab37c9e1b92f340d7167ae90664753fe579575f8cef41c987ea486ac1ac2a9e55c83704a0d25cc5
@@ -1,7 +1,7 @@
1
1
  module Novus
2
2
  module Nvd3
3
3
  module Rails
4
- VERSION = "1.8.0"
4
+ VERSION = "1.8.1"
5
5
  end
6
6
  end
7
7
  end
@@ -1,36 +1,46 @@
1
1
  !function() {
2
2
  var d3 = {
3
- version: "3.5.2"
4
- };
5
- if (!Date.now) Date.now = function() {
6
- return +new Date();
3
+ version: "3.5.5"
7
4
  };
8
5
  var d3_arraySlice = [].slice, d3_array = function(list) {
9
6
  return d3_arraySlice.call(list);
10
7
  };
11
- var d3_document = document, d3_documentElement = d3_document.documentElement, d3_window = window;
12
- try {
13
- d3_array(d3_documentElement.childNodes)[0].nodeType;
14
- } catch (e) {
15
- d3_array = function(list) {
16
- var i = list.length, array = new Array(i);
17
- while (i--) array[i] = list[i];
18
- return array;
19
- };
8
+ var d3_document = this.document;
9
+ function d3_documentElement(node) {
10
+ return node && (node.ownerDocument || node.document || node).documentElement;
11
+ }
12
+ function d3_window(node) {
13
+ return node && (node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView);
14
+ }
15
+ if (d3_document) {
16
+ try {
17
+ d3_array(d3_document.documentElement.childNodes)[0].nodeType;
18
+ } catch (e) {
19
+ d3_array = function(list) {
20
+ var i = list.length, array = new Array(i);
21
+ while (i--) array[i] = list[i];
22
+ return array;
23
+ };
24
+ }
20
25
  }
21
- try {
22
- d3_document.createElement("div").style.setProperty("opacity", 0, "");
23
- } catch (error) {
24
- var d3_element_prototype = d3_window.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = d3_window.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;
25
- d3_element_prototype.setAttribute = function(name, value) {
26
- d3_element_setAttribute.call(this, name, value + "");
27
- };
28
- d3_element_prototype.setAttributeNS = function(space, local, value) {
29
- d3_element_setAttributeNS.call(this, space, local, value + "");
30
- };
31
- d3_style_prototype.setProperty = function(name, value, priority) {
32
- d3_style_setProperty.call(this, name, value + "", priority);
33
- };
26
+ if (!Date.now) Date.now = function() {
27
+ return +new Date();
28
+ };
29
+ if (d3_document) {
30
+ try {
31
+ d3_document.createElement("DIV").style.setProperty("opacity", 0, "");
32
+ } catch (error) {
33
+ var d3_element_prototype = this.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = this.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;
34
+ d3_element_prototype.setAttribute = function(name, value) {
35
+ d3_element_setAttribute.call(this, name, value + "");
36
+ };
37
+ d3_element_prototype.setAttributeNS = function(space, local, value) {
38
+ d3_element_setAttributeNS.call(this, space, local, value + "");
39
+ };
40
+ d3_style_prototype.setProperty = function(name, value, priority) {
41
+ d3_style_setProperty.call(this, name, value + "", priority);
42
+ };
43
+ }
34
44
  }
35
45
  d3.ascending = d3_ascending;
36
46
  function d3_ascending(a, b) {
@@ -443,6 +453,9 @@
443
453
  }
444
454
  });
445
455
  d3.behavior = {};
456
+ function d3_identity(d) {
457
+ return d;
458
+ }
446
459
  d3.rebind = function(target, source) {
447
460
  var i = 1, n = arguments.length, method;
448
461
  while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);
@@ -549,8 +562,12 @@
549
562
  return n.querySelector(s);
550
563
  }, d3_selectAll = function(s, n) {
551
564
  return n.querySelectorAll(s);
552
- }, d3_selectMatcher = d3_documentElement.matches || d3_documentElement[d3_vendorSymbol(d3_documentElement, "matchesSelector")], d3_selectMatches = function(n, s) {
553
- return d3_selectMatcher.call(n, s);
565
+ }, d3_selectMatches = function(n, s) {
566
+ var d3_selectMatcher = n.matches || n[d3_vendorSymbol(n, "matchesSelector")];
567
+ d3_selectMatches = function(n, s) {
568
+ return d3_selectMatcher.call(n, s);
569
+ };
570
+ return d3_selectMatches(n, s);
554
571
  };
555
572
  if (typeof Sizzle === "function") {
556
573
  d3_select = function(s, n) {
@@ -560,7 +577,7 @@
560
577
  d3_selectMatches = Sizzle.matchesSelector;
561
578
  }
562
579
  d3.selection = function() {
563
- return d3_selectionRoot;
580
+ return d3.select(d3_document.documentElement);
564
581
  };
565
582
  var d3_selectionPrototype = d3.selection.prototype = [];
566
583
  d3_selectionPrototype.select = function(selector) {
@@ -720,7 +737,10 @@
720
737
  for (priority in name) this.each(d3_selection_style(priority, name[priority], value));
721
738
  return this;
722
739
  }
723
- if (n < 2) return d3_window.getComputedStyle(this.node(), null).getPropertyValue(name);
740
+ if (n < 2) {
741
+ var node = this.node();
742
+ return d3_window(node).getComputedStyle(node, null).getPropertyValue(name);
743
+ }
724
744
  priority = "";
725
745
  }
726
746
  return this.each(d3_selection_style(name, value, priority));
@@ -786,11 +806,14 @@
786
806
  });
787
807
  };
788
808
  function d3_selection_creator(name) {
789
- return typeof name === "function" ? name : (name = d3.ns.qualify(name)).local ? function() {
809
+ function create() {
810
+ var document = this.ownerDocument, namespace = this.namespaceURI;
811
+ return namespace ? document.createElementNS(namespace, name) : document.createElement(name);
812
+ }
813
+ function createNS() {
790
814
  return this.ownerDocument.createElementNS(name.space, name.local);
791
- } : function() {
792
- return this.ownerDocument.createElementNS(this.namespaceURI, name);
793
- };
815
+ }
816
+ return typeof name === "function" ? name : (name = d3.ns.qualify(name)).local ? createNS : create;
794
817
  }
795
818
  d3_selectionPrototype.insert = function(name, before) {
796
819
  name = d3_selection_creator(name);
@@ -1015,16 +1038,27 @@
1015
1038
  };
1016
1039
  }
1017
1040
  d3.select = function(node) {
1018
- var group = [ typeof node === "string" ? d3_select(node, d3_document) : node ];
1019
- group.parentNode = d3_documentElement;
1041
+ var group;
1042
+ if (typeof node === "string") {
1043
+ group = [ d3_select(node, d3_document) ];
1044
+ group.parentNode = d3_document.documentElement;
1045
+ } else {
1046
+ group = [ node ];
1047
+ group.parentNode = d3_documentElement(node);
1048
+ }
1020
1049
  return d3_selection([ group ]);
1021
1050
  };
1022
1051
  d3.selectAll = function(nodes) {
1023
- var group = d3_array(typeof nodes === "string" ? d3_selectAll(nodes, d3_document) : nodes);
1024
- group.parentNode = d3_documentElement;
1052
+ var group;
1053
+ if (typeof nodes === "string") {
1054
+ group = d3_array(d3_selectAll(nodes, d3_document));
1055
+ group.parentNode = d3_document.documentElement;
1056
+ } else {
1057
+ group = nodes;
1058
+ group.parentNode = null;
1059
+ }
1025
1060
  return d3_selection([ group ]);
1026
1061
  };
1027
- var d3_selectionRoot = d3.select(d3_documentElement);
1028
1062
  d3_selectionPrototype.on = function(type, listener, capture) {
1029
1063
  var n = arguments.length;
1030
1064
  if (n < 3) {
@@ -1072,9 +1106,11 @@
1072
1106
  mouseenter: "mouseover",
1073
1107
  mouseleave: "mouseout"
1074
1108
  });
1075
- d3_selection_onFilters.forEach(function(k) {
1076
- if ("on" + k in d3_document) d3_selection_onFilters.remove(k);
1077
- });
1109
+ if (d3_document) {
1110
+ d3_selection_onFilters.forEach(function(k) {
1111
+ if ("on" + k in d3_document) d3_selection_onFilters.remove(k);
1112
+ });
1113
+ }
1078
1114
  function d3_selection_onListener(listener, argumentz) {
1079
1115
  return function(e) {
1080
1116
  var o = d3.event;
@@ -1096,11 +1132,14 @@
1096
1132
  }
1097
1133
  };
1098
1134
  }
1099
- var d3_event_dragSelect = "onselectstart" in d3_document ? null : d3_vendorSymbol(d3_documentElement.style, "userSelect"), d3_event_dragId = 0;
1100
- function d3_event_dragSuppress() {
1101
- var name = ".dragsuppress-" + ++d3_event_dragId, click = "click" + name, w = d3.select(d3_window).on("touchmove" + name, d3_eventPreventDefault).on("dragstart" + name, d3_eventPreventDefault).on("selectstart" + name, d3_eventPreventDefault);
1135
+ var d3_event_dragSelect, d3_event_dragId = 0;
1136
+ function d3_event_dragSuppress(node) {
1137
+ var name = ".dragsuppress-" + ++d3_event_dragId, click = "click" + name, w = d3.select(d3_window(node)).on("touchmove" + name, d3_eventPreventDefault).on("dragstart" + name, d3_eventPreventDefault).on("selectstart" + name, d3_eventPreventDefault);
1138
+ if (d3_event_dragSelect == null) {
1139
+ d3_event_dragSelect = "onselectstart" in node ? false : d3_vendorSymbol(node.style, "userSelect");
1140
+ }
1102
1141
  if (d3_event_dragSelect) {
1103
- var style = d3_documentElement.style, select = style[d3_event_dragSelect];
1142
+ var style = d3_documentElement(node).style, select = style[d3_event_dragSelect];
1104
1143
  style[d3_event_dragSelect] = "none";
1105
1144
  }
1106
1145
  return function(suppressClick) {
@@ -1121,24 +1160,27 @@
1121
1160
  d3.mouse = function(container) {
1122
1161
  return d3_mousePoint(container, d3_eventSource());
1123
1162
  };
1124
- var d3_mouse_bug44083 = /WebKit/.test(d3_window.navigator.userAgent) ? -1 : 0;
1163
+ var d3_mouse_bug44083 = this.navigator && /WebKit/.test(this.navigator.userAgent) ? -1 : 0;
1125
1164
  function d3_mousePoint(container, e) {
1126
1165
  if (e.changedTouches) e = e.changedTouches[0];
1127
1166
  var svg = container.ownerSVGElement || container;
1128
1167
  if (svg.createSVGPoint) {
1129
1168
  var point = svg.createSVGPoint();
1130
- if (d3_mouse_bug44083 < 0 && (d3_window.scrollX || d3_window.scrollY)) {
1131
- svg = d3.select("body").append("svg").style({
1132
- position: "absolute",
1133
- top: 0,
1134
- left: 0,
1135
- margin: 0,
1136
- padding: 0,
1137
- border: "none"
1138
- }, "important");
1139
- var ctm = svg[0][0].getScreenCTM();
1140
- d3_mouse_bug44083 = !(ctm.f || ctm.e);
1141
- svg.remove();
1169
+ if (d3_mouse_bug44083 < 0) {
1170
+ var window = d3_window(container);
1171
+ if (window.scrollX || window.scrollY) {
1172
+ svg = d3.select("body").append("svg").style({
1173
+ position: "absolute",
1174
+ top: 0,
1175
+ left: 0,
1176
+ margin: 0,
1177
+ padding: 0,
1178
+ border: "none"
1179
+ }, "important");
1180
+ var ctm = svg[0][0].getScreenCTM();
1181
+ d3_mouse_bug44083 = !(ctm.f || ctm.e);
1182
+ svg.remove();
1183
+ }
1142
1184
  }
1143
1185
  if (d3_mouse_bug44083) point.x = e.pageX, point.y = e.pageY; else point.x = e.clientX,
1144
1186
  point.y = e.clientY;
@@ -1157,13 +1199,13 @@
1157
1199
  }
1158
1200
  };
1159
1201
  d3.behavior.drag = function() {
1160
- var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, d3_behavior_dragMouseSubject, "mousemove", "mouseup"), touchstart = dragstart(d3_behavior_dragTouchId, d3.touch, d3_behavior_dragTouchSubject, "touchmove", "touchend");
1202
+ var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, d3_window, "mousemove", "mouseup"), touchstart = dragstart(d3_behavior_dragTouchId, d3.touch, d3_identity, "touchmove", "touchend");
1161
1203
  function drag() {
1162
1204
  this.on("mousedown.drag", mousedown).on("touchstart.drag", touchstart);
1163
1205
  }
1164
1206
  function dragstart(id, position, subject, move, end) {
1165
1207
  return function() {
1166
- var that = this, target = d3.event.target, parent = that.parentNode, dispatch = event.of(that, arguments), dragged = 0, dragId = id(), dragName = ".drag" + (dragId == null ? "" : "-" + dragId), dragOffset, dragSubject = d3.select(subject()).on(move + dragName, moved).on(end + dragName, ended), dragRestore = d3_event_dragSuppress(), position0 = position(parent, dragId);
1208
+ var that = this, target = d3.event.target, parent = that.parentNode, dispatch = event.of(that, arguments), dragged = 0, dragId = id(), dragName = ".drag" + (dragId == null ? "" : "-" + dragId), dragOffset, dragSubject = d3.select(subject(target)).on(move + dragName, moved).on(end + dragName, ended), dragRestore = d3_event_dragSuppress(target), position0 = position(parent, dragId);
1167
1209
  if (origin) {
1168
1210
  dragOffset = origin.apply(that, arguments);
1169
1211
  dragOffset = [ dragOffset.x - position0[0], dragOffset.y - position0[1] ];
@@ -1208,12 +1250,6 @@
1208
1250
  function d3_behavior_dragTouchId() {
1209
1251
  return d3.event.changedTouches[0].identifier;
1210
1252
  }
1211
- function d3_behavior_dragTouchSubject() {
1212
- return d3.event.target;
1213
- }
1214
- function d3_behavior_dragMouseSubject() {
1215
- return d3_window;
1216
- }
1217
1253
  d3.touches = function(container, touches) {
1218
1254
  if (arguments.length < 2) touches = d3_eventSource().touches;
1219
1255
  return touches ? d3_array(touches).map(function(touch) {
@@ -1268,6 +1304,15 @@
1268
1304
  y: 0,
1269
1305
  k: 1
1270
1306
  }, translate0, center0, center, size = [ 960, 500 ], scaleExtent = d3_behavior_zoomInfinity, duration = 250, zooming = 0, mousedown = "mousedown.zoom", mousemove = "mousemove.zoom", mouseup = "mouseup.zoom", mousewheelTimer, touchstart = "touchstart.zoom", touchtime, event = d3_eventDispatch(zoom, "zoomstart", "zoom", "zoomend"), x0, x1, y0, y1;
1307
+ if (!d3_behavior_zoomWheel) {
1308
+ d3_behavior_zoomWheel = "onwheel" in d3_document ? (d3_behavior_zoomDelta = function() {
1309
+ return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1);
1310
+ }, "wheel") : "onmousewheel" in d3_document ? (d3_behavior_zoomDelta = function() {
1311
+ return d3.event.wheelDelta;
1312
+ }, "mousewheel") : (d3_behavior_zoomDelta = function() {
1313
+ return -d3.event.detail;
1314
+ }, "MozMousePixelScroll");
1315
+ }
1271
1316
  function zoom(g) {
1272
1317
  g.on(mousedown, mousedowned).on(d3_behavior_zoomWheel + ".zoom", mousewheeled).on("dblclick.zoom", dblclicked).on(touchstart, touchstarted);
1273
1318
  }
@@ -1422,7 +1467,7 @@
1422
1467
  center0 = null;
1423
1468
  }
1424
1469
  function mousedowned() {
1425
- var that = this, target = d3.event.target, dispatch = event.of(that, arguments), dragged = 0, subject = d3.select(d3_window).on(mousemove, moved).on(mouseup, ended), location0 = location(d3.mouse(that)), dragRestore = d3_event_dragSuppress();
1470
+ var that = this, target = d3.event.target, dispatch = event.of(that, arguments), dragged = 0, subject = d3.select(d3_window(that)).on(mousemove, moved).on(mouseup, ended), location0 = location(d3.mouse(that)), dragRestore = d3_event_dragSuppress(that);
1426
1471
  d3_selection_interrupt.call(that);
1427
1472
  zoomstarted(dispatch);
1428
1473
  function moved() {
@@ -1437,7 +1482,7 @@
1437
1482
  }
1438
1483
  }
1439
1484
  function touchstarted() {
1440
- var that = this, dispatch = event.of(that, arguments), locations0 = {}, distance0 = 0, scale0, zoomName = ".zoom-" + d3.event.changedTouches[0].identifier, touchmove = "touchmove" + zoomName, touchend = "touchend" + zoomName, targets = [], subject = d3.select(that), dragRestore = d3_event_dragSuppress();
1485
+ var that = this, dispatch = event.of(that, arguments), locations0 = {}, distance0 = 0, scale0, zoomName = ".zoom-" + d3.event.changedTouches[0].identifier, touchmove = "touchmove" + zoomName, touchend = "touchend" + zoomName, targets = [], subject = d3.select(that), dragRestore = d3_event_dragSuppress(that);
1441
1486
  started();
1442
1487
  zoomstarted(dispatch);
1443
1488
  subject.on(mousedown, null).on(touchstart, started);
@@ -1525,14 +1570,7 @@
1525
1570
  }
1526
1571
  return d3.rebind(zoom, event, "on");
1527
1572
  };
1528
- var d3_behavior_zoomInfinity = [ 0, Infinity ];
1529
- var d3_behavior_zoomDelta, d3_behavior_zoomWheel = "onwheel" in d3_document ? (d3_behavior_zoomDelta = function() {
1530
- return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1);
1531
- }, "wheel") : "onmousewheel" in d3_document ? (d3_behavior_zoomDelta = function() {
1532
- return d3.event.wheelDelta;
1533
- }, "mousewheel") : (d3_behavior_zoomDelta = function() {
1534
- return -d3.event.detail;
1535
- }, "MozMousePixelScroll");
1573
+ var d3_behavior_zoomInfinity = [ 0, Infinity ], d3_behavior_zoomDelta, d3_behavior_zoomWheel;
1536
1574
  d3.color = d3_color;
1537
1575
  function d3_color() {}
1538
1576
  d3_color.prototype.toString = function() {
@@ -1677,7 +1715,9 @@
1677
1715
  }
1678
1716
  }
1679
1717
  }
1680
- if (color = d3_rgb_names.get(format)) return rgb(color.r, color.g, color.b);
1718
+ if (color = d3_rgb_names.get(format.toLowerCase())) {
1719
+ return rgb(color.r, color.g, color.b);
1720
+ }
1681
1721
  if (format != null && format.charAt(0) === "#" && !isNaN(color = parseInt(format.slice(1), 16))) {
1682
1722
  if (format.length === 4) {
1683
1723
  r = (color & 3840) >> 4;
@@ -1840,6 +1880,7 @@
1840
1880
  plum: 14524637,
1841
1881
  powderblue: 11591910,
1842
1882
  purple: 8388736,
1883
+ rebeccapurple: 6697881,
1843
1884
  red: 16711680,
1844
1885
  rosybrown: 12357519,
1845
1886
  royalblue: 4286945,
@@ -1878,9 +1919,6 @@
1878
1919
  };
1879
1920
  }
1880
1921
  d3.functor = d3_functor;
1881
- function d3_identity(d) {
1882
- return d;
1883
- }
1884
1922
  d3.xhr = d3_xhrType(d3_identity);
1885
1923
  function d3_xhrType(response) {
1886
1924
  return function(url, mimeType, callback) {
@@ -1891,7 +1929,7 @@
1891
1929
  }
1892
1930
  function d3_xhr(url, mimeType, response, callback) {
1893
1931
  var xhr = {}, dispatch = d3.dispatch("beforesend", "progress", "load", "error"), headers = {}, request = new XMLHttpRequest(), responseType = null;
1894
- if (d3_window.XDomainRequest && !("withCredentials" in request) && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest();
1932
+ if (this.XDomainRequest && !("withCredentials" in request) && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest();
1895
1933
  "onload" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() {
1896
1934
  request.readyState > 3 && respond();
1897
1935
  };
@@ -2077,7 +2115,7 @@
2077
2115
  };
2078
2116
  d3.csv = d3.dsv(",", "text/csv");
2079
2117
  d3.tsv = d3.dsv(" ", "text/tab-separated-values");
2080
- var d3_timer_queueHead, d3_timer_queueTail, d3_timer_interval, d3_timer_timeout, d3_timer_active, d3_timer_frame = d3_window[d3_vendorSymbol(d3_window, "requestAnimationFrame")] || function(callback) {
2118
+ var d3_timer_queueHead, d3_timer_queueTail, d3_timer_interval, d3_timer_timeout, d3_timer_active, d3_timer_frame = this[d3_vendorSymbol(this, "requestAnimationFrame")] || function(callback) {
2081
2119
  setTimeout(callback, 17);
2082
2120
  };
2083
2121
  d3.timer = function(callback, delay, then) {
@@ -5638,7 +5676,7 @@
5638
5676
  (function find(node, x1, y1, x2, y2) {
5639
5677
  if (x1 > x3 || y1 > y3 || x2 < x0 || y2 < y0) return;
5640
5678
  if (point = node.point) {
5641
- var point, dx = x - point[0], dy = y - point[1], distance2 = dx * dx + dy * dy;
5679
+ var point, dx = x - node.x, dy = y - node.y, distance2 = dx * dx + dy * dy;
5642
5680
  if (distance2 < minDistance2) {
5643
5681
  var distance = Math.sqrt(minDistance2 = distance2);
5644
5682
  x0 = x - distance, y0 = y - distance;
@@ -6352,8 +6390,8 @@
6352
6390
  neighbors[o.target.index].push(o.source);
6353
6391
  }
6354
6392
  }
6355
- var candidates = neighbors[i], j = -1, m = candidates.length, x;
6356
- while (++j < m) if (!isNaN(x = candidates[j][dimension])) return x;
6393
+ var candidates = neighbors[i], j = -1, l = candidates.length, x;
6394
+ while (++j < l) if (!isNaN(x = candidates[j][dimension])) return x;
6357
6395
  return Math.random() * size;
6358
6396
  }
6359
6397
  return force.resume();
@@ -8575,12 +8613,8 @@
8575
8613
  return function() {
8576
8614
  var lock, active;
8577
8615
  if ((lock = this[ns]) && (active = lock[lock.active])) {
8578
- if (--lock.count) {
8579
- delete lock[lock.active];
8580
- lock.active += .5;
8581
- } else {
8582
- delete this[ns];
8583
- }
8616
+ if (--lock.count) delete lock[lock.active]; else delete this[ns];
8617
+ lock.active += .5;
8584
8618
  active.event && active.event.interrupt.call(this, this.__data__, active.index);
8585
8619
  }
8586
8620
  };
@@ -8597,7 +8631,7 @@
8597
8631
  d3_transitionPrototype.node = d3_selectionPrototype.node;
8598
8632
  d3_transitionPrototype.size = d3_selectionPrototype.size;
8599
8633
  d3.transition = function(selection, name) {
8600
- return selection && selection.transition ? d3_transitionInheritId ? selection.transition(name) : selection : d3_selectionRoot.transition(selection);
8634
+ return selection && selection.transition ? d3_transitionInheritId ? selection.transition(name) : selection : d3.selection().transition(selection);
8601
8635
  };
8602
8636
  d3.transition.prototype = d3_transitionPrototype;
8603
8637
  d3_transitionPrototype.select = function(selector) {
@@ -8726,7 +8760,7 @@
8726
8760
  }
8727
8761
  function styleString(b) {
8728
8762
  return b == null ? styleNull : (b += "", function() {
8729
- var a = d3_window.getComputedStyle(this, null).getPropertyValue(name), i;
8763
+ var a = d3_window(this).getComputedStyle(this, null).getPropertyValue(name), i;
8730
8764
  return a !== b && (i = d3_interpolate(a, b), function(t) {
8731
8765
  this.style.setProperty(name, i(t), priority);
8732
8766
  });
@@ -8737,7 +8771,7 @@
8737
8771
  d3_transitionPrototype.styleTween = function(name, tween, priority) {
8738
8772
  if (arguments.length < 3) priority = "";
8739
8773
  function styleTween(d, i) {
8740
- var f = tween.call(this, d, i, d3_window.getComputedStyle(this, null).getPropertyValue(name));
8774
+ var f = tween.call(this, d, i, d3_window(this).getComputedStyle(this, null).getPropertyValue(name));
8741
8775
  return f && function(t) {
8742
8776
  this.style.setProperty(name, f(t), priority);
8743
8777
  };
@@ -9103,8 +9137,8 @@
9103
9137
  g.selectAll(".extent,.e>rect,.w>rect").attr("height", yExtent[1] - yExtent[0]);
9104
9138
  }
9105
9139
  function brushstart() {
9106
- var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), dragRestore = d3_event_dragSuppress(), center, origin = d3.mouse(target), offset;
9107
- var w = d3.select(d3_window).on("keydown.brush", keydown).on("keyup.brush", keyup);
9140
+ var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), dragRestore = d3_event_dragSuppress(target), center, origin = d3.mouse(target), offset;
9141
+ var w = d3.select(d3_window(target)).on("keydown.brush", keydown).on("keyup.brush", keyup);
9108
9142
  if (d3.event.changedTouches) {
9109
9143
  w.on("touchmove.brush", brushmove).on("touchend.brush", brushend);
9110
9144
  } else {