aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/GestureOverlay.tsx59
-rw-r--r--src/client/views/collections/collectionFreeForm/FormatShapePane.tsx6
-rw-r--r--src/client/views/linking/LinkEditor.tsx2
3 files changed, 2 insertions, 65 deletions
diff --git a/src/client/views/GestureOverlay.tsx b/src/client/views/GestureOverlay.tsx
index a9fc20174..81bb542dd 100644
--- a/src/client/views/GestureOverlay.tsx
+++ b/src/client/views/GestureOverlay.tsx
@@ -733,19 +733,8 @@ export default class GestureOverlay extends Touchable {
this._points.push({ X: left, Y: top });
this._points.push({ X: left, Y: top });
- // this._points.push({ X: left, Y: top });
-
- // this._points.push({ X: left, Y: top });
- // this._points.push({ X: left, Y: top });
-
- // this._points.push({ X: left, Y: top - 1 });
break;
case "triangle":
- // this._points.push({ X: left, Y: bottom });
- // this._points.push({ X: right, Y: bottom });
- // this._points.push({ X: (right + left) / 2, Y: top });
- // this._points.push({ X: left, Y: bottom });
- // this._points.push({ X: left, Y: bottom - 1 });
this._points.push({ X: left, Y: bottom });
this._points.push({ X: left, Y: bottom });
@@ -779,59 +768,11 @@ export default class GestureOverlay extends Touchable {
}
this._points.push({ X: Math.sqrt(Math.pow(radius, 2) - (Math.pow((top - centerY), 2))) + centerX, Y: top });
this._points.push({ X: Math.sqrt(Math.pow(radius, 2) - (Math.pow((top - centerY), 2))) + centerX, Y: top - 1 });
- // this._points.push({ X: centerX, Y: top });
- // this._points.push({ X: centerX + radius / 2, Y: top });
-
- // this._points.push({ X: right, Y: top + radius / 2 });
- // this._points.push({ X: right, Y: top + radius });
- // this._points.push({ X: right, Y: top + radius });
- // this._points.push({ X: right, Y: bottom - radius / 2 });
-
- // this._points.push({ X: right - radius / 2, Y: bottom });
- // this._points.push({ X: right - radius, Y: bottom });
- // this._points.push({ X: right - radius, Y: bottom });
- // this._points.push({ X: left + radius / 2, Y: bottom });
-
- // this._points.push({ X: left, Y: bottom - radius / 2 });
- // this._points.push({ X: left, Y: bottom - radius });
- // this._points.push({ X: left, Y: bottom - radius });
- // this._points.push({ X: left, Y: top + radius / 2 });
-
- // this._points.push({ X: left + radius / 2, Y: top });
- // this._points.push({ X: left + radius, Y: top });
-
-
-
-
-
-
break;
case "line":
- // const firstx = this._points[0].X;
- // const firsty = this._points[0].Y;
- // const lastx = this._points[this._points.length - 1].X;
- // const lasty = this._points[this._points.length - 1].Y;
- // const fourth = (lastx - firstx) / 4;
- // const m = (lasty - firsty) / (lastx - firstx);
- // const b = firsty - m * firstx;
this._points.push({ X: firstx, Y: firsty });
this._points.push({ X: firstx, Y: firsty });
- //removed points
- // this._points.push({ X: firstx + fourth, Y: m * (firstx + fourth) + b });
- // this._points.push({ X: firstx + fourth, Y: m * (firstx + fourth) + b });
- // this._points.push({ X: firstx + fourth, Y: m * (firstx + fourth) + b });
- // this._points.push({ X: firstx + fourth, Y: m * (firstx + fourth) + b });
-
- // this._points.push({ X: firstx + 2 * fourth, Y: m * (firstx + 2 * fourth) + b });
- // this._points.push({ X: firstx + 2 * fourth, Y: m * (firstx + 2 * fourth) + b });
- // this._points.push({ X: firstx + 2 * fourth, Y: m * (firstx + 2 * fourth) + b });
- // this._points.push({ X: firstx + 2 * fourth, Y: m * (firstx + 2 * fourth) + b });
-
- // this._points.push({ X: firstx + 3 * fourth, Y: m * (firstx + 3 * fourth) + b });
- // this._points.push({ X: firstx + 3 * fourth, Y: m * (firstx + 3 * fourth) + b });
- // this._points.push({ X: firstx + 3 * fourth, Y: m * (firstx + 3 * fourth) + b });
- // this._points.push({ X: firstx + 3 * fourth, Y: m * (firstx + 3 * fourth) + b });
this._points.push({ X: firstx + 4 * fourth, Y: m * (firstx + 4 * fourth) + b });
this._points.push({ X: firstx + 4 * fourth, Y: m * (firstx + 4 * fourth) + b });
diff --git a/src/client/views/collections/collectionFreeForm/FormatShapePane.tsx b/src/client/views/collections/collectionFreeForm/FormatShapePane.tsx
index c53e4de0f..1ffa2fbed 100644
--- a/src/client/views/collections/collectionFreeForm/FormatShapePane.tsx
+++ b/src/client/views/collections/collectionFreeForm/FormatShapePane.tsx
@@ -173,11 +173,7 @@ export default class FormatShapePane extends AntimodeMenu {
const newPoints: { X: number, Y: number }[] = [];
var counter = 0;
for (var k = 0; k < index; k++) {
- for (var l = 0; l < control.length; l++) {
- if (pts[k].X === control[l].X && pts[k].Y === control[l].Y) {
- counter++;
- }
- }
+ control.forEach(pt => (pts[k].X === pt.X && pts[k].Y === pt.Y) && counter++);
}
//decide where to put the new coordinate
const spNum = Math.floor(counter / 2) * 4 + 2;
diff --git a/src/client/views/linking/LinkEditor.tsx b/src/client/views/linking/LinkEditor.tsx
index 1d71fff04..c9e39cf7b 100644
--- a/src/client/views/linking/LinkEditor.tsx
+++ b/src/client/views/linking/LinkEditor.tsx
@@ -359,7 +359,7 @@ export class LinkEditor extends React.Component<LinkEditorProps> {
changeFollowBehavior = action((follow: string) => {
this.openDropdown = false;
Doc.GetProto(this.props.linkDoc).followLinkLocation = follow;
- })
+ });
@computed
get followingDropdown() {