gka/d3-jetpack

translateCSS for html elements

1wheel opened this issue · 0 comments

something like:

export default function(xy) {
  return this.style('transform', function(d,i) {
    var p = [typeof xy == 'function' ? xy.call(this, d,i) : xy]
    return 'translate(' + p[0] + 'px, ' + p[1] + 'px)';
  });
}

gpu accelerated!