Comments (4)
Thanks for kind words and glad you like fabric.
You're right that there's no getRadius()
method, although there is "radius" property which you can also access via .get('radius')
. The thing about "radius" is that it's unaffected by scaling. So when you scale an object (by dragging its corners), you really change values of its "scaleX"/"scaleY" properties.
To get actual radius you can currently multiply radius by "scaleX" or "scaleY" (doesn't matter which, if object is resized proportionally).
But you're right that getRadius
could be useful. We already have getWidth
which returns actual width ("width" multiplied by scale), so getRadius
would be consistent with that. The only issue is — what if scaleX is not the same as scaleY. Which radius to return then? Only return if scaleX==scaleY? Or have getRadiusX, getRadiusY?
from fabric.js.
getRadiusX, getRadiusY
from fabric.js.
yes I ran into the same problem of the two differnt radius's depending on how it was scaled - I think getRadiusX and getRadiusY sounds appropriate.
from fabric.js.
Added in cc0c508
from fabric.js.
Related Issues (20)
- [bug] clippath / svg_import I have an svg file that renders properly in a browser but won't render in Kitchensink properly either grouped or ungrouped. Any ides why? HOT 6
- [Bug]: Textbox of Fabric.js does not wrap a long word HOT 8
- Opacity of object selected inside a group HOT 3
- Possibility to add filter to entire canvas same as for individual objects HOT 8
- [Feature]: Possibility to define custom attributes per control HOT 4
- [Feature]: How to Generate Curved Text ?
- [Bug]: TypeError: this.isTripleClick is not a function HOT 1
- [Feature]: add listener for right click on fabric.Control HOT 4
- [Bug]: Textbox.enterEditing() cause selectable not applying. HOT 5
- [Bug]: Selected object position change when use fabric.ActiveSelection() HOT 1
- [Feature]: why left and top property is not in selected object when their is multiple object selected in selection:created event?
- [Bug]: There is a bug where drawing with the brush and erasing with the eraser leaves an afterimage. HOT 1
- [Feature]: getCornerPoints() not working in fabric.js HOT 6
- [Bug]: When drawing with the freeDrawingBrush, drawing with a large size and drawing slowly results in blank spaces (same with the eraser). HOT 8
- [Bug]:the zoom animation of text in a small range jitters a lot HOT 5
- [Bug]: Issues with simultaneous pressing of left and middle mouse buttons HOT 8
- Problem With loadFromJSON V6 HOT 2
- [Bug]: v6 Removing the last object out of a clipgroup does not update the canvas on render HOT 6
- [Bug]: Flip object inside group whose interactive is true got wrong behavior. HOT 2
- strokeWidth with decimals HOT 3
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 fabric.js.