VisibilityTool.js 585 B

123456789101112131415161718192021222324252627
  1. /*
  2. * VisibilityTool.js
  3. *
  4. * @author realor
  5. */
  6. import { Tool } from './Tool.js'
  7. class VisibilityTool extends Tool {
  8. constructor(application, options) {
  9. super(application)
  10. this.name = 'visibility'
  11. this.label = 'tool.visibility.label'
  12. this.help = 'tool.visibility.help'
  13. this.className = 'visibility'
  14. this.immediate = true
  15. this.visible = true
  16. this.setOptions(options)
  17. }
  18. execute() {
  19. this.application.updateVisibility(null, this.visible)
  20. }
  21. }
  22. export { VisibilityTool }