-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
includeDefaultValues on text and path object (minor priority) #3491
Comments
there is description enough for no need of filtering. |
Thank you. Let me know if this is a bug. By the way, the attribute "charSpacing" seems present in the code : line 27. |
path-group and group did not send the includeDefaultValues option down to sub objects. |
i agree that canvas should not return a background empty since it does not return all the other empty things. |
crossOrigin is not a state property and i would do not any special thing to remove an additional property. |
Thank you for the bugfix. For the "charSpacing" field, it's ok, i think i made a mistake or a cache problem when i switched from v1.6.7 to 1.7.1, because now it's ok, and it looks like the "charSpacing" have been added to the stateProperties array during v1.7.0. Good news if the background empty is removed like other empty properties. For the empty array, it's not a big deal, i could still remove them manualy, but it seems to me it's useless to have them in the json, other empty array are removed but it's because there are in the stateProperties list. For the crossOrigin, i could add it to the stateProperties to remove it. like in this example : But it seems the empty json obj or array (ex : "styles" for itext or "filters" for image) can't be removed this way which is strange because the function "_removeDefaultValues()" check if the properties is an array or not before removing it. Thank you again for you quick fix. |
is very hard to remove the styles. you have to make a deep check. |
Hi,
I don't want to export default values, but it seems there is still some default values staying if i check the generated JSON. these are the minor bugs/strange behavior i detected.
If i export a "path-group" object, the default properties are correctly filtered out, but in the "PATH" object there is still in the default values (like scaleX/Y or skewX/Y), it looks like the sub object "path" is not affected but the value of the "includeDefaultValues" parameters if included in a "path-group" object.
For the text object, the propertie "charSpacing" is exported even if i don't change it (default = 0). It's a new function perhaps the attribute name is not present in the list to remove used by the includeDefaultValues function. Or is that normal ?
The canvas "background" attribute isn't filtered by the "includeDefaultValues" even when the value is the default value "".
For the image object the "crossOrignin" (default value = "") is exported event if it's not changed is this normal ?
The filters[] and resizeFilters[] are exported even if empty. Idem for the canvas.objects[] when it's empty.
=> If it's normal to keep them ? if yes, is there a way to manually add these attributes to the remove default list attributes ? (i tried to play with the "statesProperties" attribute but without success).
PS : I don't make a fiddle but i could create one or attach a json export if necessary.
Thank you for your help. Keep up the good work.
The text was updated successfully, but these errors were encountered: