Page 1 of 1

[INFO REQ] Apply multiple classes to cls property.

Posted: Thu May 26, 2022 4:49 pm
by kevin.snps

We are trying to dynamically add custom css classes to dependencies . We are using the cls property of a dependency to add css classes.
But can we add multiple css classes to cls property. currently i can add only one class.

Example-code

``this.dependencies[0].cls = 'custom-css-class';``

CSS classes

.custom-css-class {
  stroke: red;
}

.custom-css-class-arrow {
  fill: red;
}

By adding only one of the above class (custom-css-class) we are able to change the property of stroke. but the color of arrow head is black we also want that to be changed is there any way to achive this.


Re: [INFO REQ] Apply multiple classes to cls property.

Posted: Fri May 27, 2022 10:07 am
by alex.l

It is not supported now, I've opened a feature request for that https://github.com/bryntum/support/issues/4686


Re: [INFO REQ] Apply multiple classes to cls property.

Posted: Fri May 27, 2022 10:52 am
by alex.l

Just confirmed it works in 5.1.0
After it released, you will be able to specify classes separated by space.

dependencyRecord.cls = "custom-css-class custom-css-class-arrow"

We already released 5.1.0-alpha-1, 5.1.0 should be released in a week or two, in very raw estimation.


Re: [INFO REQ] Apply multiple classes to cls property.

Posted: Fri May 27, 2022 10:58 am
by kevin.snps

Thank you so much, Alex. We will be looking forward to the release of 5.1.0.