← All releasesReleased on with 0.3.2 and 0.3.3
Element Editor 0.3.1
Added
- Headless hosts get the drawing bar: new
drawingBarprop. Both adapters'<ElementEditorControls />now show the drawing bar (hint plus Done / Undo point / Cancel on touch) at the bottom centre of the map while a drawing tool is on, so a host with its own toolbar and tools driven byref.setToolcan finish a shape by touch. Its presses never reach the map, so tapping Done adds no point. PassdrawingBar={false}if your own UI replaces it (for example you render<ActiveDrawingToolbar />yourself, as in the custom-UI guide; do that to avoid two bars).<ElementEditor />is unchanged. The bar loads on demand, so a headless host's initial bundle barely grows. See Custom UI with adapters. autoExitAfterDrawprop: one shape at a time. PassautoExitAfterDrawto<ElementEditor />(both engines) or either adapter's<ElementEditorControls />and every drawing tool turns off after a finished shape; the new shape is selected andonToolChange(null)fires once.falsekeeps tools on. The prop wins over the user's saved setting without overwriting it, and the "Return to select after each shape" Settings toggle (andCmd+J) becomes read-only with a "Set by the app" note. Unset keeps today's behaviour. Core:uiStore.autoExitLocked,setAutoExitProp. See Drawing tools.
Changed
- Drag a selected feature to move it, no modifier needed. A plain drag (mouse or one finger) that starts on an already-selected point, line, area or multi-geometry moves it, and a drag on any feature of a multi-selection moves them all, exactly as
Cmd/Ctrl-drag does (one undo step). Selected features show a move cursor, and a grabbing hand while moving; a press that moves less than 8 px stays a click. A drag on an unselected feature or on empty map pans,Cmd/Ctrl-drag still moves any feature, and drawing tools, point editing andreadonlyare unchanged. Two fingers always zoom. On MapLibre a plain drag on an unselected feature used to select and move it; it now pans, as on Leaflet. On Leaflet aCmd/Ctrl-drag of a multi-selection no longer collapses the selection to the feature under the cursor.
Fixed
- MapLibre:
Ctrl-drag on a feature moves it on Windows and Linux. MapLibre rotates the map onCtrl+left-drag, so the feature never moved. The rotate gesture is now off while a drag that starts on a feature is running (Ctrl-drag on empty map still rotates).Cmd-drag on macOS was not affected. ref.setVertexEditcalled fromonReady(or any mount effect) no longer gets reset right away. In StrictMode the editor appliedinitialDataa second time after the call, and that load cleared the selection and with it point editing, so hosts needed asetTimeout(0).initialDatais now applied once per mount (useAdapterControls).- The published stylesheets are plain CSS.
@element-editor/react/style.css,@element-editor/react/leaflet/style.css,@element-editor/adapter-leaflet/style.cssand@element-editor/adapter-maplibre/style.cssno longer contain@layerblocks or other Tailwind directives, so they import cleanly in a host built with Tailwind v3 (which failed with "@layer baseis used but no matching@tailwind basedirective"), with another PostCSS setup, or with none, and under?url/?raw. Because they are no longer layered, host CSS no longer beats Element's rules by default inside the editor; the rules stay scoped todata-elm-themeand Element's portals, and look the same as before.