Webiks / force-horse

force-horse: An angular.js wrapper for a d3.js force layout
http://webiks.com/blog/force-horse-demo/
16 stars 3 forks source link

[Enhancement]: Accept an "onInit" method #2

Open YonatanKra opened 8 years ago

YonatanKra commented 8 years ago

Accept an onInit method that would be called once the directive is initiated. This method will be called with the forceHorseInstance. This would replace the current options.forceHorseInstance mechanism. Motivation:

  1. Creating more than one forceHorse with the same options object.
  2. Preventing memory leaks by not forcing the user to hold the API in a long term object.