Git Product home page Git Product logo

Comments (1)

JamesLMilner avatar JamesLMilner commented on June 11, 2024 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:

  1. 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
  2. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.