StatisticsTool.js 688 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * StatisticsTool.js
  3. *
  4. * @author realor
  5. */
  6. import { Tool } from './Tool.js'
  7. import { Statistics } from '../ui/Statistics.js'
  8. class StatisticsTool extends Tool {
  9. constructor(application, options) {
  10. super(application)
  11. this.name = 'statistics'
  12. this.label = 'tool.statistics.label'
  13. this.help = 'tool.statistics.help'
  14. this.className = 'statistics'
  15. this.immediate = true
  16. this.setOptions(options)
  17. this.panel = new Statistics(this.application)
  18. application.panelManager.addPanel(this.panel)
  19. }
  20. execute() {
  21. this.panel.visible = true
  22. }
  23. }
  24. export { StatisticsTool }