aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-02-05 22:56:04 -0500
committerbobzel <zzzman@gmail.com>2024-02-05 22:56:04 -0500
commita888150f2e220eff4629551aa03813f92aa0b12f (patch)
tree0b32c2cd524566a3d71fe3f7e64f41de77421e2c /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
parent6d38ee15c640f652fd637016adcfc129617cdd50 (diff)
changed backgroundColor to set on dataDocs. fixed pivoting on tags. fixed link description editing popup. fixed showing link editor in property view - still some weirdness in what is selected. fixed dragging tree view items to set dragData.treeview and be able to drop at bottom of tree. fixed addFolder menu option for TreeViews to add locally.. added a function to collect all docs of a given tag into a collection. fixed setting default font size to update autolayouts. changed dropping link onto same collection to not leave pushpin. fixed minimap thumb updating. added fieldvalue dropdown for dashFieldViews in text.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx30
1 files changed, 8 insertions, 22 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index bd046d6ff..b08221f99 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -424,27 +424,13 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
const [x, y] = this.screenToFreeformContentsXf.transformPoint(de.x, de.y);
let added = false;
// do nothing if link is dropped into any freeform view parent of dragged document
- const source =
- !linkDragData.dragDocument.embedContainer || linkDragData.dragDocument.embedContainer !== this.Document
- ? Docs.Create.TextDocument('', { _width: 200, _height: 75, x, y, title: 'dropped annotation' })
- : Docs.Create.FontIconDocument({
- title: 'anchor',
- icon_label: '',
- followLinkToggle: true,
- icon: 'map-pin',
- x,
- y,
- backgroundColor: '#ACCEF7',
- layout_hideAllLinks: true,
- layout_hideLinkButton: true,
- _width: 15,
- _height: 15,
- _xPadding: 0,
- onClick: FollowLinkScript(),
- });
+ const source = Docs.Create.TextDocument('', { _width: 200, _height: 75, x, y, title: 'dropped annotation' });
added = this._props.addDocument?.(source) ? true : false;
de.complete.linkDocument = DocUtils.MakeLink(linkDragData.linkSourceGetAnchor(), source, { link_relationship: 'annotated by:annotation of' }); // TODODO this is where in text links get passed
-
+ if (de.complete.linkDocument) {
+ de.complete.linkDocument.layout_isSvg = true;
+ this.addDocument(de.complete.linkDocument);
+ }
e.stopPropagation();
!added && e.preventDefault();
return added;
@@ -1651,9 +1637,9 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
toggleResetView = () => {
this.dataDoc[this.autoResetFieldKey] = !this.dataDoc[this.autoResetFieldKey];
if (this.dataDoc[this.autoResetFieldKey]) {
- this.dataDoc[this.panXFieldKey + '_reset'] = this.dataDoc[this.panXFieldKey];
- this.dataDoc[this.panYFieldKey + '_reset'] = this.dataDoc[this.panYFieldKey];
- this.dataDoc[this.scaleFieldKey + '_reset'] = this.dataDoc[this.scaleFieldKey];
+ this.dataDoc[this.panXFieldKey + '_reset'] = this.layoutDoc[this.panXFieldKey];
+ this.dataDoc[this.panYFieldKey + '_reset'] = this.layoutDoc[this.panYFieldKey];
+ this.dataDoc[this.scaleFieldKey + '_reset'] = this.layoutDoc[this.scaleFieldKey];
}
};