Skip to content
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

Apply default style for not overwritten properties #684

Closed
Jesus89 opened this issue May 21, 2019 · 1 comment
Closed

Apply default style for not overwritten properties #684

Jesus89 opened this issue May 21, 2019 · 1 comment
Assignees

Comments

@Jesus89
Copy link
Member

Jesus89 commented May 21, 2019

Default properties (color, width, strokeColor, strokeWidth) should be applied always unless they are overwritten by the user. For example: String API 'color: blue' should overwrite the color, but keep the rest of the properties. The same for the Dict API { 'color: 'blue' }.

The implementation is easy for the Dict API, just update the defaults dictionary with the style one. For the String API it's a bit more tricky because we need to detect the style properties contained in the string ('color:' in style) to remove the defaults, and then serialize the rest of defaults.

@Jesus89 Jesus89 added this to the Helper methods milestone May 21, 2019
@Jesus89 Jesus89 self-assigned this May 21, 2019
@Jesus89 Jesus89 changed the title Overwrite style defaults Apply default style for not overwritten properties May 21, 2019
@Jesus89
Copy link
Member Author

Jesus89 commented May 23, 2019

Closed via #685

@Jesus89 Jesus89 closed this as completed May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant