2021-12-05 17:33:09 +01:00
|
|
|
import $ from 'jquery';
|
2022-07-13 03:58:11 +02:00
|
|
|
import { Workspace, Arrow, Point } from '../../src';
|
2021-12-05 00:39:20 +01:00
|
|
|
|
2021-12-30 21:32:32 +01:00
|
|
|
const workspace = new Workspace({ fillColor: 'green' });
|
|
|
|
workspace.setSize('200px', '200px');
|
2021-12-05 00:39:20 +01:00
|
|
|
const arrow = new Arrow();
|
|
|
|
arrow.setFrom(50, 50);
|
|
|
|
arrow.setControlPoint(new Point(-50, 0));
|
|
|
|
|
2021-12-30 21:32:32 +01:00
|
|
|
workspace.append(arrow);
|
2021-12-05 00:39:20 +01:00
|
|
|
|
|
|
|
const arrow2 = new Arrow();
|
|
|
|
arrow2.setFrom(100, 50);
|
|
|
|
arrow2.setControlPoint(new Point(50, 50));
|
|
|
|
|
2021-12-30 21:32:32 +01:00
|
|
|
workspace.append(arrow2);
|
2021-12-05 00:39:20 +01:00
|
|
|
|
2021-12-30 21:32:32 +01:00
|
|
|
workspace.addItAsChildTo($('#overflowExample').first());
|