diff options
author | bobzel <zzzman@gmail.com> | 2020-07-11 20:49:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-11 20:49:00 -0400 |
commit | ff642c9f9846a182e7ca8893b2ca414bb8ce480f (patch) | |
tree | 534cb1d9b12e95d351595e8f7f11b4573123275c /src/client/views/DocumentDecorations.tsx | |
parent | bf8c338e662327b39cdef3f90c436447e48d2807 (diff) | |
parent | 49b6ab8536f570ef244199ac39194d3b176c9e77 (diff) |
Merge pull request #438 from browngraphicslab/ink_menu
format shape pane
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index a45ef8862..0bf4814e7 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -152,8 +152,8 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> if (e.button === 0 && !e.altKey && !e.ctrlKey) { let child = SelectionManager.SelectedDocuments()[0].ContentDiv!.children[0]; while (child.children.length) { - const next = Array.from(child.children).find(c => !c.className.includes("collectionViewChrome")); - if (next?.className.includes("documentView-node")) break; + const next = Array.from(child.children).find(c => typeof (c.className) !== "string" || !c.className.includes("collectionViewChrome")); + if (typeof (next?.className) === "string" && next?.className.includes("documentView-node")) break; if (next) child = next; else break; } @@ -293,6 +293,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> SelectionManager.SelectedDocuments().forEach(action((element: DocumentView) => { const doc = Document(element.rootDoc); if (doc.type === DocumentType.INK && doc.x && doc.y && doc._width && doc._height && doc.data) { + doc.rotation = Number(doc.rotation) + Number(angle); const ink = Cast(doc.data, InkField)?.inkData; if (ink) { |