diff --git a/index.html b/index.html index d7ba1b9ca..a9898a7fb 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,6 @@ -
diff --git a/js/lib/d3.combobox.js b/js/lib/d3.combobox.js index 188dfc60b..90865f847 100644 --- a/js/lib/d3.combobox.js +++ b/js/lib/d3.combobox.js @@ -72,11 +72,9 @@ export function d3combobox() { .insert('div', ':first-child') .datum(input.node()) .attr('class', 'combobox') - .styles({ - position: 'absolute', - display: 'block', - left: '0px' - }) + .style('position', 'absolute') + .style('display', 'block') + .style('left', '0px') .on('mousedown', function () { // prevent moving focus out of the text field d3.event.preventDefault(); @@ -233,11 +231,10 @@ export function d3combobox() { var node = attachTo ? attachTo.node() : input.node(), rect = node.getBoundingClientRect(); - container.styles({ - 'left': rect.left + 'px', - 'width': rect.width + 'px', - 'top': rect.height + rect.top + 'px' - }); + container + .style('left', rect.left + 'px') + .style('width', rect.width + 'px') + .style('top', rect.height + rect.top + 'px'); } function select(d, i) { diff --git a/modules/util/curtain.js b/modules/util/curtain.js index 540a7fe2e..130c22a4a 100644 --- a/modules/util/curtain.js +++ b/modules/util/curtain.js @@ -15,13 +15,11 @@ export function d3curtain() { function curtain(selection) { surface = selection.append('svg') .attr('id', 'curtain') - .styles({ - 'z-index': 1000, - 'pointer-events': 'none', - 'position': 'absolute', - 'top': 0, - 'left': 0 - }); + .style('z-index', 1000) + .style('pointer-events', 'none') + .style('position', 'absolute') + .style('top', 0) + .style('left', 0); darkness = surface.append('path') .attr('x', 0) diff --git a/modules/util/tooltip.js b/modules/util/tooltip.js index 8e18ab557..8cd65e583 100644 --- a/modules/util/tooltip.js +++ b/modules/util/tooltip.js @@ -123,9 +123,11 @@ export function tooltip() { break; } - tip.styles(pos ? - {left: ~~pos.x + 'px', top: ~~pos.y + 'px'} : - {left: null, top: null}); + if (pos) { + tip.style('left', ~~pos.x + 'px').style('top', ~~pos.y + 'px'); + } else { + tip.style('left', null).style('top', null); + } this.tooltipVisible = true; }