Comments (4)
hi @Serene47 you can look at the fabricjs repo and a jsdoc there if missing
from fabricjs.com.
hi @asturur, Yeah I am fine with js doc,
But my point is people who are new with fabric js, assume util.object.clone
for cloning fabric objects, use it and break their code at some point.
Some posts justifying my point
I also ran into that kind of problem and had to put some effort to find the repo and look into it.
I assume if we provide documentation on the official page, people are more likely to read that.
from fabricjs.com.
I have nothing against an explanation of that jsdoc on the website. But how would you frame it?
the only place i can think of is the fabricjs-gotchas.
This is what we say in the fabricJS docs for extend:
/**
* Copies all enumerable properties of one js object to another
* this does not and cannot compete with generic utils.
* Does not clone or extend fabric.Object subclasses.
* This is mostly for internal use and has extra handling for fabricJS objects
* it skips the canvas and group properties in deep cloning.
* @memberOf fabric.util.object
* @param {Object} destination Where to copy to
* @param {Object} source Where to copy from
* @return {Object}
*/
and this is what we say for clone:
/**
* Creates an empty object and copies all enumerable properties of another object to it
* @memberOf fabric.util.object
* TODO: this function return an empty object if you try to clone null
* @param {Object} object Object to clone
* @return {Object}
*/
Now the main issue is that the clone jsdoc needs to be updated with the content of the extend one.
That is 100% useful and quick to do. If you want to add a specific part in the docs, make a proposal with a PR on this repo.
from fabricjs.com.
Hi, thanks for your suggestion
I have added pull requests in fabricjs/fabric.js and fabricjs/fabricjs.com
from fabricjs.com.
Related Issues (20)
- Customization page HOT 2
- Incorrect js files on cloudflare HOT 1
- Custom build produces build using 3.6.x version instead of 4.1.0 HOT 2
- Cannot update Textbox/IText - text reverting to the original field
- How to serialise and deserialise custom attributes
- Modify the cropX cropY parameter that contains the clipPath object, it not be updated after canvas.renderAll()?
- use HTTPS to secure the http://fabricjs.com/ website HOT 1
- Unable to serialize: Uncaught TypeError: Cannot read properties of null (reading 'src') HOT 2
- SSL for FabricJS HOT 3
- Navigation template in 'docs' directory HOT 1
- Stickman remove button
- issue template
- demos(): Image.fromURL is broken HOT 8
- regist dynamic font file always show error:argument isrequired HOT 1
- Low priority: Custom builds require 'Animation' to be checked HOT 1
- Effects overlap with buttons when selecting checkboxes on Custom Build Page.
- Which one is real development documentation ? HOT 4
- How to make rect scale freely HOT 3
- <video> example doesn't work HOT 1
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 fabricjs.com.