Open TylerMatteo opened 8 months ago
Tracking this here: https://github.com/NYCPlanning/ae-zoning-map-poc/discussions/66
I played around with making a custom drawing tool. Code is on https://github.com/NYCPlanning/ae-remix-template/tree/bespoke-drawing
I extended the custom drawing tool. There are changes to both the functionality and the code structure. Changes are on: bespoke-drawing-store
For functionality, there are now modes specific to drawing points and linestrings (...with the intent to support squares, right triangles, and/or free-hand polygons, etc). There are also multiple ways to end/cancel drawing. 1) Clicking again on the selector buttons 2) Pressing "Enter" 3) clicking again on the last drawn point or 4) Reaching the maximum number of allowed points in a linestring.
For structural changes, it now relies on the reducer pattern outlined in this client state discussion. It also uses Immer to isolate and control changes to the store, improving rendering predictability and performance. I chose to use the reducer and context hooks because Zustand seems to obfuscate much of the state update control, hampering the ability to reason about and control state changes.
Cross-post to discussion #66
We'll use this Issue to track work related to experimenting with nebula.gl in the front end proof of concept app. Nebula.gl is a library for geojson-based drawing and selection that is part of the same ecosystem as Deck.gl and built on React.
Here are some things we want to experiment with doing with nebula:
This would be a great Issue for two engineers to pair on. Once some basic set up is done, the above tasks could be split between more than one engineer.
We do not have designs or wireframes for this because the goal is just experimentation. Engineers can add to the UI as the see fit with simple buttons using the existing Streetscape components.