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.

28 lines
574 B

  1. 'use strict';
  2. import ShapeBase from '../util/ShapeBase'
  3. /**
  4. * A Star Node/Cluster shape.
  5. *
  6. * @param {Object} options
  7. * @param {Object} body
  8. * @param {Label} labelModule
  9. * @constructor TriangleDown
  10. * @extends ShapeBase
  11. */
  12. class Star extends ShapeBase {
  13. constructor(options, body, labelModule) {
  14. super(options, body, labelModule)
  15. }
  16. draw(ctx, x, y, selected, hover, values) {
  17. this._drawShape(ctx, 'star', 4, x, y, selected, hover, values);
  18. }
  19. distanceToBorder(ctx, angle) {
  20. return this._distanceToBorder(ctx,angle);
  21. }
  22. }
  23. export default Star;