aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/MapBox/MapPushpinBox.tsx
diff options
context:
space:
mode:
authorEric <ericmabr@gmail.com>2023-07-10 14:26:37 -0400
committerEric <ericmabr@gmail.com>2023-07-10 14:26:37 -0400
commit9d48c95e5a556f5be4abde83d9443e384a33197c (patch)
tree153544573a279a487bb59b52026b7c05890a70c4 /src/client/views/nodes/MapBox/MapPushpinBox.tsx
parenta6878385b554c976f73fd14cfa29f6417cf4ee0b (diff)
Location metadata synced and reactions working
Diffstat (limited to 'src/client/views/nodes/MapBox/MapPushpinBox.tsx')
-rw-r--r--src/client/views/nodes/MapBox/MapPushpinBox.tsx38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/client/views/nodes/MapBox/MapPushpinBox.tsx b/src/client/views/nodes/MapBox/MapPushpinBox.tsx
new file mode 100644
index 000000000..13fb11054
--- /dev/null
+++ b/src/client/views/nodes/MapBox/MapPushpinBox.tsx
@@ -0,0 +1,38 @@
+import { observer } from 'mobx-react';
+// import { SettingsManager } from '../../../util/SettingsManager';
+import { ViewBoxBaseComponent } from '../../DocComponent';
+import { FieldView, FieldViewProps } from '../FieldView';
+import React = require('react');
+import { computed } from 'mobx';
+import { MapBox } from './MapBox';
+
+
+/**
+ * Map Pushpin doc class
+ */
+@observer
+export class MapPushpinBox extends ViewBoxBaseComponent<FieldViewProps>() {
+
+
+ public static LayoutString(fieldKey: string) {
+ return FieldView.LayoutString(MapPushpinBox, fieldKey);
+ }
+ componentDidMount() {
+ this.mapBoxView.addPushpin(this.rootDoc);
+ }
+ componentWillUnmount() {
+ this.mapBoxView.removePushpin(this.rootDoc);
+ }
+
+
+ @computed get mapBoxView() {
+ return this.props.DocumentView?.()?.props.docViewPath().lastElement()?.ComponentView as MapBox;
+ }
+ @computed get mapBox() {
+ return this.props.DocumentView?.().props.docViewPath().lastElement()?.rootDoc;
+ }
+
+ render() {
+ return (<div></div>);
+ }
+}