Created
April 10, 2018 19:40
-
-
Save xoor-io/e6502968e9d754f166781d73033705ed to your computer and use it in GitHub Desktop.
d3-canvas-zoom-06
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const toolsList = container.select('.tools') | |
.style('margin-top', margin.top + 'px') | |
.style('visibility', 'visible'); | |
toolsList.select('#reset').on('click', () => { | |
const t = d3.zoomIdentity.translate(0, 0).scale(1); | |
canvasChart.transition() | |
.duration(200) | |
.ease(d3.easeLinear) | |
.call(zoom_function.transform, t) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment