aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-03-19 11:28:00 -0400
committerbobzel <zzzman@gmail.com>2025-03-19 11:28:00 -0400
commit5e73c471b14d5007306fd1bedfdf349769bd5f82 (patch)
treef71a5ddddc5c9baf14b82090ed24d5e30165cbeb
parente8dde2173f3fe36e245c1b34af4440c70175bc1c (diff)
fixed mapBox full screen. fixed link following from node at start of texts (eg mapbox target in sidebar doc)
-rw-r--r--src/client/views/nodes/MapBox/MapBox.tsx4
-rw-r--r--src/client/views/nodes/formattedText/FormattedTextBoxComment.tsx24
2 files changed, 12 insertions, 16 deletions
diff --git a/src/client/views/nodes/MapBox/MapBox.tsx b/src/client/views/nodes/MapBox/MapBox.tsx
index 80afcd802..e7aad7a82 100644
--- a/src/client/views/nodes/MapBox/MapBox.tsx
+++ b/src/client/views/nodes/MapBox/MapBox.tsx
@@ -1221,8 +1221,8 @@ export class MapBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
top: 0,
left: 0,
zIndex: '0',
- width: NumCast(this.layoutDoc._width) * parscale,
- height: NumCast(this.layoutDoc._height) * parscale,
+ width: this._props.PanelWidth() * parscale,
+ height: this._props.PanelHeight() * parscale,
}}
initialViewState={this._isAnimating ? undefined : this.mapboxMapViewState}
onZoom={this.onMapZoom}
diff --git a/src/client/views/nodes/formattedText/FormattedTextBoxComment.tsx b/src/client/views/nodes/formattedText/FormattedTextBoxComment.tsx
index 6c0eac103..1d790f5bb 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBoxComment.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBoxComment.tsx
@@ -134,20 +134,16 @@ export class FormattedTextBoxComment {
// this checks if the selection is a hyperlink. If so, it displays the target doc's text for internal links, and the url of the target for external links.
if (state.selection.$from && hrefs?.length) {
- const nbef = findStartOfMark(state.selection.$from, view, findLinkMark);
- const naft = findEndOfMark(state.selection.$from, view, findLinkMark) || nbef;
- // nbef &&
- naft &&
- LinkInfo.SetLinkInfo({
- DocumentView: textBox.DocumentView,
- styleProvider: textBox._props.styleProvider,
- linkSrc: textBox.Document,
- linkDoc: linkDoc ? (DocServer.GetCachedRefField(linkDoc) as Doc) : undefined,
- location: (pos => [pos.left, pos.top + 25])(view.coordsAtPos(state.selection.from - Math.max(0, nbef - 1))),
- hrefs,
- showHeader: true,
- noPreview,
- });
+ LinkInfo.SetLinkInfo({
+ DocumentView: textBox.DocumentView,
+ styleProvider: textBox._props.styleProvider,
+ linkSrc: textBox.Document,
+ linkDoc: linkDoc ? (DocServer.GetCachedRefField(linkDoc) as Doc) : undefined,
+ location: (pos => [pos.left, pos.top + 25])(view.coordsAtPos(state.selection.from - Math.max(0, 0 - 1))),
+ hrefs,
+ showHeader: true,
+ noPreview,
+ });
}
}