Commit 6422accb authored by S Anand's avatar S Anand

BUG: allow zoom to work in iPad, IE11, etc

parent 3fc0c515
This diff is collapsed.
...@@ -3,8 +3,8 @@ G.zoom = function(options) { ...@@ -3,8 +3,8 @@ G.zoom = function(options) {
var selector = options.selector, var selector = options.selector,
speed = options.speed || 50, speed = options.speed || 50,
container = d3.select(selector), container = d3.select(selector),
// Note: children does not exist on the iPad children = d3.selectAll(container.node().childNodes)
children = d3.selectAll(container.node().children), .filter(function() { return this.nodeName != '#text' }),
abruptzoom = d3.behavior.zoom() abruptzoom = d3.behavior.zoom()
.on('zoom', function() { .on('zoom', function() {
children.attr('transform', 'translate(' + d3.event.translate + ')scale(' + d3.event.scale + ')') children.attr('transform', 'translate(' + d3.event.translate + ')scale(' + d3.event.scale + ')')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment