aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-03-18 00:08:13 -0400
committerbobzel <zzzman@gmail.com>2021-03-18 00:08:13 -0400
commit188e1e57860f58e9ebe3536a0e1f7cd84ea0db80 (patch)
tree72d1824332295c6a58b7b5933125133b19c5c0f3 /src/client/views/nodes/DocumentView.tsx
parent6f4f0ffb9f4ab816cf6055c62afc6f79b8e4961f (diff)
cleaned up link making. Documents don't add to the Undo stack when being created and Initializing is set. Links to text regions automatically update their link line endpoints even if autoMove isn't set. regularized initialization fields to avoid special cases about setting delegate keys without a leading "_"
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index a1bedcf6e..a9372aa64 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -558,9 +558,9 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps
@undoBatch @action
toggleFollowLink = (location: Opt<string>, zoom: boolean, setPushpin: boolean): void => {
this.Document.ignoreClick = false;
- this.Document.isLinkButton = !this.Document.isLinkButton;
- setPushpin && (this.Document.isPushpin = this.Document.isLinkButton);
- if (this.Document.isLinkButton && !this.onClickHandler) {
+ this.Document._isLinkButton = !this.Document._isLinkButton;
+ setPushpin && (this.Document.isPushpin = this.Document._isLinkButton);
+ if (this.Document._isLinkButton && !this.onClickHandler) {
this.Document.followLinkZoom = zoom;
this.Document.followLinkLocation = location;
} else {
@@ -570,13 +570,13 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps
@undoBatch @action
toggleTargetOnClick = (): void => {
this.Document.ignoreClick = false;
- this.Document.isLinkButton = true;
+ this.Document._isLinkButton = true;
this.Document.isPushpin = true;
}
@undoBatch @action
followLinkOnClick = (location: Opt<string>, zoom: boolean,): void => {
this.Document.ignoreClick = false;
- this.Document.isLinkButton = true;
+ this.Document._isLinkButton = true;
this.Document.isPushpin = false;
this.Document.followLinkZoom = zoom;
this.Document.followLinkLocation = location;
@@ -584,14 +584,14 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps
@undoBatch @action
selectOnClick = (): void => {
this.Document.ignoreClick = false;
- this.Document.isLinkButton = false;
+ this.Document._isLinkButton = false;
this.Document.isPushpin = false;
this.Document.onClick = this.layoutDoc.onClick = undefined;
}
@undoBatch
noOnClick = (): void => {
this.Document.ignoreClick = false;
- this.Document.isLinkButton = false;
+ this.Document._isLinkButton = false;
}
@undoBatch deleteClicked = () => this.props.removeDocument?.(this.props.Document);
@@ -630,7 +630,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps
}
this.Document.followLinkLocation = "inPlace";
this.Document.followLinkZoom = true;
- this.Document.isLinkButton = true;
+ this.Document._isLinkButton = true;
}
@action