Closed rogerhutchings closed 9 years ago
svg.zoomIn = function () { svg.panZoom.zoomIn(); }; svg.zoomOut = function () { svg.panZoom.zoomOut(); }; svg.reset = function () { svg.panZoom.reset(); };
<div class="btn-group-vertical log-controls" role="group"> <button class="btn btn-default" ng-click="svg.reset()"> <span class="glyphicon glyphicon-resize-full"></span> </button> <button class="btn btn-default" ng-click="svg.zoomIn()"> <span class="glyphicon glyphicon-zoom-in"></span> </button> <button class="btn btn-default" ng-click="svg.zoomOut()"> <span class="glyphicon glyphicon-zoom-out"></span> </button> </div>
I think the reset can replace your centre method.
Need to include a statement in the tutorial about to do this.