Skip to content

Commit 044b0ba

Browse files
authored
Merge pull request #8 from DynamicEnvironmentSystems/ina/add-circle-api
Ina/add circle api
2 parents 1c2a59d + fd88b27 commit 044b0ba

File tree

6 files changed

+22
-7
lines changed

6 files changed

+22
-7
lines changed

dist/pdf-annotate.js

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pdf-annotate.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pdf-annotate.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pdf-annotate.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/UI/circle.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,10 @@ export function disableCircle() {
8989
_enabled = false;
9090
document.removeEventListener('mouseup', handleDocumentMouseup);
9191
}
92+
93+
export function addCircle(type, e) {
94+
let oldType = _type;
95+
_type = type;
96+
handleDocumentMouseup(e);
97+
_type = oldType;
98+
}

src/UI/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { disablePen, enablePen, setPen } from './pen';
44
import { disableArrow, enableArrow, setArrow } from './arrow';
55
import { disablePoint, enablePoint } from './point';
66
import { disableRect, enableRect } from './rect';
7-
import { disableCircle, enableCircle, setCircle } from './circle';
7+
import { disableCircle, enableCircle, setCircle, addCircle } from './circle';
88
import { disableText, enableText, setText } from './text';
99
import { createPage, renderPage } from './page';
1010

@@ -14,7 +14,7 @@ export default {
1414
disablePen, enablePen, setPen,
1515
disablePoint, enablePoint,
1616
disableRect, enableRect,
17-
disableCircle, enableCircle, setCircle,
17+
disableCircle, enableCircle, setCircle, addCircle,
1818
disableArrow, enableArrow, setArrow,
1919
disableText, enableText, setText,
2020
createPage, renderPage

0 commit comments

Comments
 (0)