diff options
| author | bobzel <zzzman@gmail.com> | 2023-05-08 11:34:29 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-05-08 11:34:29 -0400 |
| commit | 2255f2ffd4d9c5818d8d26f1814b315ad914eaa9 (patch) | |
| tree | e0c9611f6f8262e9076b3e046d38036754291285 /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | |
| parent | 37f282f075f521fe9ece21e151a51ffd47016782 (diff) | |
fixed dragging inkMask strokes. fixed background color/fill for strokes. fixed send to back. changed #tags to be a list
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 9cc732008..25da868e0 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -1158,7 +1158,10 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection @action bringToFront = (doc: Doc, sendToBack?: boolean) => { if (sendToBack) { - doc.zIndex = 0; + const docs = this.childLayoutPairs.map(pair => pair.layout).slice(); + docs.sort((doc1, doc2) => NumCast(doc1.zIndex) - NumCast(doc2.zIndex)); + let zfirst = docs.length ? NumCast(docs[0].zIndex) : 0; + doc.zIndex = zfirst - 1; } else if (doc.isInkMask) { doc.zIndex = 5000; } else { |
