Comments (1)
Hey, thanks for following up. Yes, you are right, this won't update on Select resizing. Unfortunately this is not really possible for a couple of reasons:
- Select mode has no concept of circles/rectangles etc, as it treats everything as a polygon and has no special behaviours for any given mode, beyond the standardised configuration flags provided
- Once you edit the circle and distort it in any way it is deformed and not really a circle any more so the concept of a radius is no longer relevant
Select mode could be use with any number of other drawing modes, including custom ones. As such I don't think it is a wise software architectural decision to have hardcoded behaviours for modes within the Select mode.
As such this would need to be implemented in your own code and could be achieved by implementing either a custom Select mode, or if you want something simpler you could calculate the radius after any change by taking any coordinate of the circle and calculating the distance from that coordinate to the center. I hope this helps, sorry that it's probably not the answer you're hoping for.
I'm going to close this issue as it will not be being implemented in at the library level. I hope the two options provided above help you find a solution!
from terra-draw.
Related Issues (20)
- A method for real-time acquisition of circular radius HOT 1
- Draw a circle and add a minimum radius configuration attribute HOT 1
- Enhance opposite-planar HOT 2
- Add attributes that can limit the minimum area for drawing HOT 1
- Circle editing status, fast scaling issue HOT 6
- Graphics editing status, no Finish event triggered. HOT 4
- Set Node 20/npm 10 as the default environment for development
- [Bug] Circular shape abnormality in editing state HOT 7
- [Feature Request] Added polygon point adsorption function HOT 1
- [Feature Request] Support custom validation when performing edits in Select mode HOT 1
- [Bug] Broken links in README
- Circle editing status, fast scaling issue HOT 1
- [Feature Request] Bring validation functionality from select mode to all drawing modes
- [Potential Bug] The circle is scaled repeatedly, causing irregular shape problems.
- [Bug] Property 'getCoordinatePrecision' is missing in type 'TerraDrawMapLibreGLAdapter' HOT 9
- [Bug] Issue with right click to delete removing multiple coordinates whilst polygon/linestring editing HOT 6
- [Feature Request] There should be dedicated event for coordinate "drag end" HOT 1
- [Potential Bug] Unexpected result of polygon editing HOT 2
- [Roadmap] Road to v1!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terra-draw.