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.

22 lines
438 B

  1. 'use strict';
  2. import ShapeBase from '../util/ShapeBase'
  3. class Triangle extends ShapeBase {
  4. constructor(options, body, labelModule) {
  5. super(options, body, labelModule)
  6. }
  7. resize(ctx) {
  8. this._resizeShape();
  9. }
  10. draw(ctx, x, y, selected, hover) {
  11. this._drawShape(ctx, 'triangle', 3, x, y, selected, hover);
  12. }
  13. distanceToBorder(ctx, angle) {
  14. return this._distanceToBorder(angle);
  15. }
  16. }
  17. export default Triangle;