Coder Social home page Coder Social logo

Comments (6)

asturur avatar asturur commented on June 2, 2024

Where getCornerPoints comes from? it wasn't part of fabric 5 nor fabric 6. Where did you find it out?

from fabric.js.

zhe-he avatar zhe-he commented on June 2, 2024

v6 -> obj.getCoords()
v5 -> obj.getCoords(true) obj.getCoords(false)

from fabric.js.

niketaOptimumnbrew avatar niketaOptimumnbrew commented on June 2, 2024

Where getCornerPoints comes from? it wasn't part of fabric 5 nor fabric 6. Where did you find it out?

@asturur It was used in version 1.7.22

from fabric.js.

niketaOptimumnbrew avatar niketaOptimumnbrew commented on June 2, 2024

v6 -> obj.getCoords() v5 -> obj.getCoords(true) obj.getCoords(false)

@zhe-he Can we get cornerpoints of object using getCoords() method in fabric.js version 5.3.0?

from fabric.js.

zhe-he avatar zhe-he commented on June 2, 2024

@niketaOptimumnbrew
You can use the method getCoords starting from 1.7.22, which retrieves the points of the four corners. I also couldn't find the method getCornerPoints you mentioned.

image
image
image

from fabric.js.

asturur avatar asturur commented on June 2, 2024

ok i admit i forgot at this point of anything so old.

getCoords will return you the 4 corners points in scene coordinate, in design space to understand.
If you want them in canvas zoomed coordinates rethink what you are doing a second and try to make it work on scene coordinates

I highly suggest you to do not migrate an old project to 5.3 but you just do it to 6.

from fabric.js.

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.