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

feat(Vectorizer)!: support camel case attributes, add attributeNames static property #2430

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

kumilingus
Copy link
Contributor

Description

The PR enables the camel case attribute support by default and makes the attributeNames property public.
The supportCamelCaseAttributes property remains private.

Before:

V('g').attr('myAttribute', 'value') // <g myAttribute="value"/>

Now:

V('g').attr('myAttribute', 'value') // <g my-attribute="value"/>

Allows you to use camel case attribute names anywhere in JointJS. e.g targetMarker, mvc.View.prototype.attributes

Migration guide

If you need any attribute to stay camel cased, you have to define it through attributeNames property.

V.attributeNames['myAttribute'] = 'myAttribute';
V('g').attr('myAttribute', 'value') // <g myAttribute="value"/>

@kumilingus kumilingus changed the title feat(Vectorizer): add attributeNames property feat(Vectorizer)!: support camel case attributes, add attributeNames static property Dec 12, 2023
@zbynekstara zbynekstara merged commit 5e743f3 into clientIO:dev Dec 12, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants