Basic Primitives

Basic Primitives is a 100% JavaScript component library for building general purpose diagrams without manual nodes layout.

  • Increase font size
  • Default font size
  • Decrease font size

Item & group title colors

Item's title background color may be used for grouping items in diagram and may vary in wide range of colors. at the same time title font color should be always readable on every background. So taking these considerations into account widget allows to customize title background color for every Item with itemTitleColor property and provides means to choose the best title font color out of two options: itemTitleFirstFontColor and itemTitleSecondFontColor. Widget uses primitives.common.highestContrast function to choose font color having highest contrast on item's title background. See reference.

 

  

 

Comments 

 
#11 Dexter Solar 2018-11-06 08:23
Does it have an auto size for each node?
Quote
 
 
#10 Administrator 2018-09-05 07:09
Quoting Dario de Judicibus:
If I use css to chabge the background color or image of shape, the color/image covers the text field. Any idea why?

Please, post sample code.
Quote
 
 
#9 Dario de Judicibus 2018-09-02 06:48
If I use css to chabge the background color or image of shape, the color/image covers the text field. Any idea why?
Quote
 
 
#8 Dairy Milk 2017-05-10 06:26
Hi

Is it possible to change the font size of the Description

Many thanks in advance
Quote
 
 
#7 Administrator 2017-04-18 22:36
Quoting Freuh:
Quoting Roberto Carlos Zaccarelli Asbun:
Hi,

How can I change the font size of GroupTitlePanel ?

Roberto Z.


+1 please.

Thank you!

Hi Roberto
See version 3.7.7 for groupTitleFontS ize option.
Quote
 
 
#6 Roberto Carlos Zaccarelli Asbun 2016-02-26 20:27
Hi,

How can I change the font size of GroupTitlePanel ?

Roberto Z.
Quote
 
 
#5 Administrator 2015-10-13 21:04
Quoting Pedro:
How can i disable the selection area an highling too ...

Look at "Inactive items in laout" sample
Quote
 
 
#4 Pedro 2015-10-13 15:46
How can i disable the selection area an highling too ...
Quote
 
 
#3 Jim S. 2013-01-15 00:22
Quoting Administrator:
Jim

Yes, if you change default template, you change default item rendering call back function as well, so in your rendering function you have to set not only your custom fields, but default ItemConfig attributes as well.

If all titles have the same background color, then you don't need to assign them in code for every item, it is wasting of time and unnecessary DOM changes. And it is not good to assign background color in template as well. The best and the fastest way is to create some CSS class and assigned it to background element in your template.

Sergey


Thank you, Sergey, for the clarification !

Jim S.
Quote
 
 
#2 Administrator 2013-01-13 22:49
Jim

Yes, if you change default template, you change default item rendering call back function as well, so in your rendering function you have to set not only your custom fields, but default ItemConfig attributes as well.

If all titles have the same background color, then you don't need to assign them in code for every item, it is wasting of time and unnecessary DOM changes. And it is not good to assign background color in template as well. The best and the fastest way is to create some CSS class and assigned it to background element in your template.

Sergey
Quote
 
 
#1 Jim S. 2013-01-13 22:31
Hi,

It seems that if you are using custom templates, defining the background color of the tiltle like this [itemX.itemTitleColor = .....] does not work.

The only way it worked for me is by definig the background color explicitly in the template.

May be I am missing something, not sure.

Jim S.
Quote
 

Add comment


Do you need?

Diagrams
 

Do you use?

JavaScript Frameworks
 

Do you use?

PDF & Image Export Support