vis.js is a dynamic, browser-based visualization library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
531 B

  1. /**
  2. * Created by Alex on 3/18/2015.
  3. */
  4. 'use strict';
  5. import NodeUtil from './nodeUtil'
  6. class Dot extends NodeUtil {
  7. constructor (options, body, labelModule) {
  8. super(options, body, labelModule)
  9. }
  10. setOptions(options) {
  11. this.options = options;
  12. }
  13. resize(ctx) {
  14. this._resizeShape();
  15. }
  16. draw(ctx, x, y, selected, hover) {
  17. this._drawShape(ctx, 'circle', 2, x, y, selected, hover);
  18. }
  19. distanceToBorder(ctx, angle) {
  20. return this.options.size + this.options.borderWidth;
  21. }
  22. }
  23. export default Dot;