Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
67952ae
first commit
Idzikowski-Casey Apr 7, 2021
363338b
shared verticies will snap on drag. Fixed in same feature bug and tri…
Idzikowski-Casey Apr 22, 2021
82654fe
found more bugs. A short-term solution is at draw.update I've just re…
Idzikowski-Casey Apr 22, 2021
7a58168
verticies change together onDrag
Idzikowski-Casey Apr 22, 2021
b615f6e
increase performance, lose granularity
Idzikowski-Casey Apr 22, 2021
8ae71f6
postgis-geo-map as submodule
Idzikowski-Casey May 8, 2021
718129a
db persistence, WIP: creating new polys. My helper function sucks still
Idzikowski-Casey May 13, 2021
b8758da
fixes clicking within feature and other feature, code simplified, dis…
Idzikowski-Casey May 21, 2021
6f118cc
custom draw modes are now isolated in separate files
Idzikowski-Casey May 25, 2021
f109653
custom draw modes are now isolated in separate files
Idzikowski-Casey May 25, 2021
cb5f8b1
deleted voroni stuff, created a view that joins map-faces on identity…
Idzikowski-Casey May 25, 2021
2cca60a
blueprintjs components used for navbar and overlay
Idzikowski-Casey Jun 3, 2021
57c1264
property view mode init commit
Idzikowski-Casey Jun 3, 2021
e38f009
enhanced frontend design and editing capabilities
Idzikowski-Casey Jun 3, 2021
62106e9
blueprint components for spruced up frontend
Idzikowski-Casey Jun 3, 2021
b18838c
download geojson button
Idzikowski-Casey Jun 24, 2021
7d62478
Importer class and API with frontend exposure if nothing in DB
Idzikowski-Casey Jun 25, 2021
157f117
WIP frontend: polygon on click, backend: config style project differe…
Idzikowski-Casey Jun 29, 2021
022bd9c
WIP, break map useEffect into smaller pieces. Larger state management
Idzikowski-Casey Jun 30, 2021
5ffd010
WIP
Idzikowski-Casey Jul 1, 2021
b920a07
major changes
Idzikowski-Casey Jul 13, 2021
728a4ca
New project creation is now possible through frontend and supported o…
Idzikowski-Casey Aug 2, 2021
e0fc824
bugs and WIP column-groups
Idzikowski-Casey Aug 25, 2021
1e53afa
Col groups meta table. Foreign key in project_schema.columns. Color c…
Idzikowski-Casey Aug 26, 2021
94c77e9
Col group can be added to column, a new col group can be created and …
Idzikowski-Casey Aug 26, 2021
199f690
Feature updates; can add known geometry via WKT or GeoJSON
Idzikowski-Casey Sep 1, 2021
61d3cae
begin simplifcation
Idzikowski-Casey Sep 1, 2021
354a42c
code refactored
Idzikowski-Casey Sep 8, 2021
dcde766
begin dockerization; column-groups are project specific, download as csv
Idzikowski-Casey Sep 13, 2021
6b68b64
dockerized application
Idzikowski-Casey Oct 14, 2021
e6a7c76
docker ports and api base env variables
Idzikowski-Casey Oct 26, 2021
0539b66
docker now runs frontend production and runs an npx static server
Idzikowski-Casey Oct 26, 2021
f9fb94b
simplified environment variables
Idzikowski-Casey Oct 26, 2021
f676a2e
changelog, one char change for moving connected points in same polygo…
Idzikowski-Casey Nov 17, 2021
e1eb346
multiline-string works for draggin, line tool not working yet
Idzikowski-Casey Nov 20, 2021
ba9bfb6
snapping tool with multilinestring; now snapping to a point on the li…
Idzikowski-Casey Nov 22, 2021
eb77ac6
snapping changed back to relative pixel distance instead of absolute …
Idzikowski-Casey Dec 6, 2021
b6dae55
toolbar is fixed to top and map is completely visible
Idzikowski-Casey Dec 6, 2021
fa5807f
Properties Modal is now draggable
Idzikowski-Casey Dec 6, 2021
a7d7cb0
Properties Modal is now draggable
Idzikowski-Casey Dec 6, 2021
919c612
Properties Modal is now draggable
Idzikowski-Casey Dec 6, 2021
bc5e35b
Properties Modal is now draggable
Idzikowski-Casey Dec 6, 2021
f3362a4
map is set under navbar
Idzikowski-Casey Dec 6, 2021
6b23339
turf function randomly began returning Infinity and breaking everything
Idzikowski-Casey Dec 10, 2021
a98197d
some quality of life UI enhancements
Idzikowski-Casey Dec 10, 2021
49a7b7c
more streamlined home panel; panelstack and about page panel
Idzikowski-Casey Dec 10, 2021
35f7f6f
project btn spacing
Idzikowski-Casey Dec 13, 2021
119d942
removed unused import
Idzikowski-Casey Dec 27, 2021
68f0de7
create n-sided polygon that expands on mousemove
Idzikowski-Casey Dec 28, 2021
e1fcf24
hold shift on vertix click to prevent dragging
Idzikowski-Casey Dec 28, 2021
7c13da0
increased click buffer
Idzikowski-Casey Dec 28, 2021
b6e9dd4
removed unused
Idzikowski-Casey Dec 28, 2021
d841385
WIP reseting info overlay after post/put
Idzikowski-Casey Dec 28, 2021
f5a98c5
columns have a description field and column-groups can have specified…
Idzikowski-Casey Dec 28, 2021
f24a893
proper attribution
Idzikowski-Casey Dec 30, 2021
1079488
WIP, property dialog shows updated info on save. But can't be edited …
Idzikowski-Casey Dec 30, 2021
ba1a28e
Edited properties visible on save, polygon stays highlighted and it c…
Idzikowski-Casey Dec 30, 2021
3af751a
work off of postgrest API
Idzikowski-Casey Jun 30, 2022
b4112a2
import points as well, have option for no column geometries
Idzikowski-Casey Jul 1, 2022
5b6435b
wip voronoi mode
Idzikowski-Casey Jul 5, 2022
68087ae
Voronoi tesselation
Idzikowski-Casey Jul 12, 2022
c794f3e
map event handlers for drawing
Idzikowski-Casey Jul 13, 2022
74b1031
handling point state
Idzikowski-Casey Jul 13, 2022
eaae5b7
nav-bar aware of some state
Idzikowski-Casey Jul 14, 2022
59977c9
nav-bar aware of some state
Idzikowski-Casey Jul 14, 2022
fafb7ee
wip
Idzikowski-Casey Jul 14, 2022
5ac1c4c
remove onclick refiring
Idzikowski-Casey Jul 14, 2022
f0cdb79
more straightforward points only approach
Idzikowski-Casey Jul 14, 2022
473ee3b
more straightforward points only approach
Idzikowski-Casey Jul 14, 2022
262e544
database persistence for voronoi
Idzikowski-Casey Jul 19, 2022
d627ed9
WIP trying to get SVGs to work
Idzikowski-Casey Jul 19, 2022
7c52d54
upgraded parcel
Idzikowski-Casey Jul 19, 2022
e4aaa07
WIP make buffer radius and quad_seg dynamci
Idzikowski-Casey Jul 19, 2022
98c8c67
remove map event listeners; radius and quad_seqs in state
Idzikowski-Casey Jul 19, 2022
3e5d4ff
clean up console logging
Idzikowski-Casey Jul 19, 2022
65e6d40
figuring out col-group-ids
Idzikowski-Casey Jul 24, 2022
4089d0b
development port change
Idzikowski-Casey Jul 27, 2022
14e7b20
remove unused console logs
Idzikowski-Casey Jul 27, 2022
dd7566a
remove options event listner
Idzikowski-Casey Jul 28, 2022
3406512
removed console log
Idzikowski-Casey Jul 28, 2022
59f9e7a
mapbox token to env
Idzikowski-Casey Jul 28, 2022
9f38467
major rework of state flow
Idzikowski-Casey Jul 28, 2022
4ed1f0d
larger start radius
Idzikowski-Casey Jul 28, 2022
d9c6bd7
more radius choices
Idzikowski-Casey Jul 28, 2022
ed77987
proper way to copy modes
Idzikowski-Casey Jul 29, 2022
bbd7597
correct order of mode object assignment
Idzikowski-Casey Jul 29, 2022
dd7cd9f
help text
Idzikowski-Casey Jul 29, 2022
a048941
unused imports
Idzikowski-Casey Jul 29, 2022
ed08003
simplyfy
Idzikowski-Casey Jul 29, 2022
857701d
points only expoty
Idzikowski-Casey Jul 29, 2022
298a3cc
blueprint menu
Idzikowski-Casey Jul 29, 2022
a6f9f38
frontend clean ups
Idzikowski-Casey Jul 29, 2022
212e8bc
saving toasters shouldn't timeout until complete
Idzikowski-Casey Jul 29, 2022
5322cfb
only accept wkt
Idzikowski-Casey Jul 29, 2022
c55d963
addGeom needs to update based on draw.ref
Idzikowski-Casey Jul 29, 2022
cb7a092
frontend clean ups
Idzikowski-Casey Jul 29, 2022
77a0ff7
moved exmaple .env
Idzikowski-Casey Jul 29, 2022
9165bf3
needed to get it to build
Idzikowski-Casey Jul 30, 2022
5926353
Some small edits to dependency files
davenquinn Oct 27, 2022
4951d93
Merge remote-tracking branch 'column-footprint-editor/footprints-edit…
davenquinn Aug 2, 2025
d06e70f
Merge remote-tracking branch 'origin/main' into column-footprint-editor
davenquinn Aug 4, 2025
9a63b1b
Some dependency updates
davenquinn Aug 4, 2025
f254932
Added a skeletal page
davenquinn Aug 4, 2025
a7c6d64
Updated dependencies
davenquinn Aug 4, 2025
58a7001
Fixed basic styling errors
davenquinn Aug 4, 2025
08df584
Updated topology manager views
davenquinn Aug 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/column-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"@macrostrat/form-components": "^0.2.2",
"@macrostrat/hyper": "^3.0.6",
"@macrostrat/ui-components": "^4.1.2",
"@mapbox/mapbox-gl-draw": "^1.3.0",
"@mapbox/mapbox-gl-draw": "^1.5.0",
"@supabase/postgrest-js": "^1.18.1",
"@types/mapbox__mapbox-gl-draw": "^1.2.3",
"axios": "^1.7.9",
"cross-fetch": "^3.1.5",
"mapbox-gl": "^3.0.0",
"mapbox-gl": "^3.13.0",
"react": "^18",
"react-beautiful-dnd": "^13.1.0",
"react-color": "^2.19.3"
Expand Down
6 changes: 6 additions & 0 deletions packages/column-footprint-editor/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
Dockerfile
package-lock.json
/node_modules/*
/dist/*
/.parcel-cache/*
5 changes: 5 additions & 0 deletions packages/column-footprint-editor/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## .env file must go in the frontend directory

API_BASE=http://geologic_map_api/
MAPBOX_TOKEN=mapbox_access_token
## https://docs.mapbox.com/help/getting-started/access-tokens/
6 changes: 6 additions & 0 deletions packages/column-footprint-editor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
package-lock.json
.parcel-cache
Dockerfile.dev
dist
__pychache__
8 changes: 8 additions & 0 deletions packages/column-footprint-editor/.parcelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@parcel/config-default",
"transformers": {
"jsx:*.svg": [
"@parcel/transformer-svg-react"
]
}
}
16 changes: 16 additions & 0 deletions packages/column-footprint-editor/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:14

WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH


COPY package*.json ./

RUN npm install

COPY . .

RUN npm run build
WORKDIR /app/dist

ENTRYPOINT ["npx", "serve", "-p", "1235"]
27 changes: 27 additions & 0 deletions packages/column-footprint-editor/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@macrostrat/column-footprint-editor",
"private": true,
"main": "src/index.tsx",
"scripts": {
"start": "ENV=development parcel serve -p 1235 ./src/index.html",
"build": "ENV=production parcel build --public-url /column-topology/ ./src/index.html"
},
"dependencies": {
"@blueprintjs/core": "^5.10.2",
"@blueprintjs/popover2": "^1.4.1",
"@blueprintjs/select": "^5.1.4",
"@macrostrat/ui-components": "^4.4.4",
"@mapbox/mapbox-gl-draw": "^1.5.0",
"@turf/nearest-point-on-line": "^5.1.5",
"@types/mapbox__mapbox-gl-draw": "^1.2.4",
"axios": "^1.11.0",
"mapbox-gl": "^3.13.0",
"mapbox-gl-draw-snap-mode": "^0.4.0",
"react": "^18.3.0",
"react-color": "^2.19.3",
"react-dom": "^18.3.0",
"react-loading-overlay": "^1.0.1",
"react-router-dom": "^5.3.0",
"topojson-client": "^3.1.0"
}
}
10 changes: 10 additions & 0 deletions packages/column-footprint-editor/src/assets/12-side.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/column-footprint-editor/src/assets/16-side.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions packages/column-footprint-editor/src/assets/20-side.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions packages/column-footprint-editor/src/assets/24-side.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions packages/column-footprint-editor/src/assets/4-side.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/column-footprint-editor/src/assets/8-side.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import React from "react";
import { Button } from "@blueprintjs/core";
import { useAPIResult } from "@macrostrat/ui-components";
import { base } from "../../context/env";

function SaveButton(props) {
const { onClick, minimal, disabled } = props;

return (
<Button
intent="primary"
minimal={minimal}
onClick={onClick}
disabled={disabled}
>
Save
</Button>
);
}

function downloadObjectAsJson(exportObj, exportName) {
var dataStr = "data:text/csv;charset=utf-8," + encodeURIComponent(exportObj);
var downloadAnchorNode = document.createElement("a");
downloadAnchorNode.setAttribute("href", dataStr);
downloadAnchorNode.setAttribute("download", exportName + ".csv");
document.body.appendChild(downloadAnchorNode); // required for firefox
downloadAnchorNode.click();
downloadAnchorNode.remove();
}

function DownloadButton(props) {
const { project_id } = props;
let data = [];
if (project_id) {
data = useAPIResult(base + `${project_id}/csv`);
}

const onClick = () => {
downloadObjectAsJson(data, "columns");
};
return (
<Button
icon="download"
intent="primary"
onClick={onClick}
minimal={true}
disabled={project_id == null}
>
Download
</Button>
);
}

export { SaveButton, DownloadButton };
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import React, { useState, useEffect } from "react";
import { Overlay, Button, Card } from "@blueprintjs/core";
import "./main.css";

function OverlayBox(props) {
const {
open,
children,
closeOpen,
HeaderComponent,
className = "overlay",
closeButton = true,
cardStyles = {},
} = props;

const [state, setState] = useState({ top: 100, left: 20 });
const [offset, setOffset] = useState({ rel_x: 0, rel_y: 0 });
const [dragging, setDragging] = useState(false);

useEffect(() => {
//setup event listeners
if (!dragging) return;
document.addEventListener("mousemove", onMouseMove);
document.addEventListener("mouseup", onMouseUp);
return () => {
document.removeEventListener("mouseup", onMouseUp);
document.removeEventListener("mousemove", onMouseMove);
};
}, [dragging]);

const onMouseDown = (e) => {
if (e.button !== 0) return;
setDragging(true);
setOffset(getOffest(e));
};

const onMouseUp = (e) => {
setDragging(false);
e.stopPropagation();
e.preventDefault();
};

const getOffest = (e) => {
const rel_x = e.pageX - state.left;
const rel_y = e.pageY - state.top;
return { rel_x, rel_y };
};

const onMouseMove = (e) => {
if (dragging) {
const { rel_x, rel_y } = offset;
const left_ = e.pageX - rel_x;
const top_ = e.pageY - rel_y;
setState({ top: top_, left: left_ });
}
e.stopPropagation();
e.preventDefault();
};

const overlayProperties = {
autoFocus: true,
canEscapeKeyClose: true,
canOutsideClickClose: true,
enforceFocus: false,
hasBackdrop: false,
usePortal: true,
useTallContent: false,
};

const style = { top: `${state.top}px`, left: `${state.left}px` };

return (
<Overlay isOpen={open} {...overlayProperties}>
<div className={className} style={style}>
<Card style={cardStyles}>
<HeaderComponent onMouseDown={onMouseDown} />
{children}
{closeButton ? (
<Button intent="danger" onClick={closeOpen}>
Close
</Button>
) : null}
</Card>
</div>
</Overlay>
);
}

export { OverlayBox };
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export * from "./dialog";
export * from "./navbar";
export * from "./buttons";
export * from "./toaster";
export * from "./select";
62 changes: 62 additions & 0 deletions packages/column-footprint-editor/src/components/blueprint/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

.overlay {
max-width: 500px;
}

.drag-bar-top {
height: 50px;
width: 100%;
z-index: 22;
}

.projects-drop-down {
display: flex;
align-items: flex-start;
flex-direction: column;
padding: 5px;
justify-content: flex-end;
}

.projects-drop-more {
display: flex;
flex-direction: column;
padding: 5px;
justify-content: flex-end;
}

.nav-contents {
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 10px;
}

.toolbar {
max-width: 300px;
margin-top: 5px;
}

.nav-right,
.nav-left {
display: flex;
align-items: center;
}

.panel-stack {
min-height: 500px;
}

.main-dialog-header {
margin-top: 5px;
margin-left: 5px;
}

.btn-holder {
float: right;
margin-top: -23px;
margin-right: -20px;
}

.project-btns {
margin: 0px 5px 10px 0px;
}
Loading