Basic Primitives

Pure JavaScript jQuery UI Widgets

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

primitives.js

Summary
primitives.js
Functions
primitives.common.isNullOrEmptyIndicates whether the specified string is null or an Empty string.
primitives.common.hashCodeReturns hash code for specified string value.
primitives.common.attrThis method assigns HTML element attributes only if one of them does not match its current value.
primitives.common.cssThis method assigns HTML element style attributes only if one of them does not match its current value.
primitives.common.stopPropogationThis method uses various approaches used in different browsers to stop event propagation.
primitives.common.indexOfThis method searches array for specified item and returns index (or -1 if not found) Parameters: vector - An array through which to search.
primitives.common.supportsSVGIndicates whether the browser supports SVG graphics.
primitives.common.supportsVMLIndicates whether the browser supports VML graphics.
primitives.common.supportsCanvasIndicates whether the browser supports HTML Canvas graphics.
primitives.common.getColorHexValueConverts color string into HEX color string.
primitives.common.getColorNameConverts color string into HTML color name string or return hex color string.
primitives.common.getRedGets red value of HEX color string.
primitives.common.getGreenGets green value of HEX color string.
primitives.common.getBlueGets blue value of HEX color string.
primitives.common.beforeOpacityCalculates before opacity color value producing color you need after applying opacity.
primitives.common.highestContrastThis function calculates contrast between base color and two optional first and second colors and returns optional color having highest contrast.
primitives.common.luminosityThis function calculates luminosity between two HEX string colors.
Enumerations
primitives.orgdiagram.AdviserPlacementTypeDefines item placement in tree relative to parent.
primitives.orgdiagram.UpdateModeDefines redraw mode of diagram.
primitives.text.TextOrientationTypeDefines label orientation type.
primitives.orgdiagram.SelectionPathModeDefines the display mode for items between root item of diagram and selected items.
primitives.common.RenderingModeThis enumeration is used as option in arguments of rendering events.
primitives.common.PlacementTypeDefines element placement relative to rectangular area.
primitives.orgdiagram.PageFitModeDefines diagram auto fit mode.
primitives.orgdiagram.OrientationTypeDefines diagram orientation type.
primitives.orgdiagram.ItemTypeDefines diagram item type.
primitives.common.HorizontalAlignmentTypeDefines text label alignment inside text box boundaries.
primitives.ocommon.GraphicsTypeGraphics type.
primitives.common.EnabledDefines option state.
primitives.orgdiagram.ConnectorTypeDefines diagram connectors style for dot and line elements.
primitives.common.ColorsNamed colors.
primitives.orgdiagram.ChildrenPlacementTypeDefines children placement shape.
primitives.common.VerticalAlignmentTypeDefines text label alignment inside text box boundaries.
primitives.orgdiagram.VisibilityDefines nodes visibility mode.
primitives.orgdiagram.EventArgsEvent details class.
Properties
oldContextReference to associated previous item in rootItem hierarchy.
contextReference to associated new item in rootItem hierarchy.
parentItemReference parent item of item in context.
positionAbsolute item position on diagram.
nameRelative object name.
cancelAllows cancelation of coupled event processing.
primitives.common.RenderEventArgsRendering event details class.
Properties
elementjQuery selector referencing template’s root element.
contextReference to itemConfig.
templateNameThis is template name used to render this item.
renderingModeThis option indicates current template state.
isCursorRendered item is cursor.
isSelectedRendered item is selected.
primitives.common.PointClass represents pair of x and y coordinates that defines a point in 2D plane.
Properties
xThe x coordinate.
yThe y coordinate.
Functions
distanceToReturns distance to point.
toStringReturns rectangle location in form of CSS style string.
primitives.common.RectClass describes the width, height and location of rectangle.
Properties
xThe location x coordinate.
yThe location y coordinate.
widthThe width of rectangle.
heightThe height of rectangle.
Functions
leftGets the x-axis value of the left side of the rectangle.
topGets the y-axis value of the top side of the rectangle.
rightGets the x-axis value of the right side of the rectangle.
bottomGets the y-axis value of the bottom of the rectangle.
verticalCenterGets the y-axis value of the center point of the rectangle.
horizontalCenterGets the x-axis value of the center point of the rectangle.
isEmptyGets the value that indicates whether the rectangle is the Empty rectangle.
offsetExpands the rectangle by using specified value in all directions.
translateMoves the rectangle to by the specified horizontal and vertical amounts.
invertInverts rectangle.
containsIndicates whether the rectangle contains the specified point.
cropByRectCrops the rectangle by the boundaries of specified rectangle.
overlapsReturns true if the rectangle overlaps specified rectangle.
addRectExpands the current rectangle to contain specified rectangle.
getCSSReturns rectangle location and size in form of CSS style object.
toStringReturns rectangle location and size in form of CSS style string.
primitives.common.SizeClass describes the size of an object.
Properties
widthThe value that specifies the width of the size class.
heightThe value that specifies the height of the size class.
Functions
invertSwaps width and height.
primitives.common.ThicknessClass describes the thickness of a frame around rectangle.
Properties
leftThe thickness for the left side of the rectangle.
topThe thickness for the upper side of the rectangle.
rightThe thickness for the right side of the rectangle.
bottomThe thickness for the bottom side of the rectangle.
Functions
isEmptyGets the value that indicates whether the thickness is the Empty.
toStringReturns thickness in form of CSS style string.
primitives.text.ConfigText options class.
Properties
graphicsTypePreferable graphics type.
actualGraphicsTypeActual graphics type.
textDirectionDirection style.
textText
verticalAlignmentVertical alignment.
horizontalAlignmentHorizontal alignment.
fontSizeFont size.
fontFamilyFont family.
colorColor.
Font weight.Font weight: normal | bold
Font style.Font style: normal | italic
Functions
updateMakes full redraw of text widget contents reevaluating all options.
primitives.callout.ConfigCallout options class.
Properties
graphicsTypePreferable graphics type.
actualGraphicsTypeActual graphics type.
pointerPlacementDefines pointer connection side or corner.
positionDefines callout body position.
snapPointCallout snap point.
cornerRadiusBody corner radius in percents or pixels.
offsetBody rectangle offset.
opacityBackground color opacity.
lineWidthBorder line width.
pointerWidthPointer base width in percents or pixels.
borderColorBorder Color.
fillColorFill Color.
Functions
updateMakes full redraw of callout widget contents reevaluating all options.
primitives.orgdiagram.TemplateConfigUser defines item template class.
Properties
nameEvery template should have unique name.
itemSizeThis is item size of type primitives.common.Size, templates should have fixed size, so orgDiagram uses this value in order to layout items properly.
itemBorderWidthItem template border width.
itemTemplateItem template, if it is null then default item template is used.
minimizedItemSizeThis is size dot used to display item in minimized form, type of primitives.common.Size.
highlightPaddingThis padding around item defines relative size of highlight object, ts type is primitives.common.Thickness.
highlightBorderWidthHighlight border width.
highlightTemplateHighlight template, if it is null then default highlight template is used.
cursorPaddingThis padding around item defines relative size of cursor object, its type is primitives.common.Thickness.
cursorBorderWidthCursor border width.
cursorTemplateCursor template, if it is null then default cursor template is used.
primitives.orgdiagram.ButtonConfigOptions class.
Properties
nameIt should be unique string name of the button.
iconName of icon used in jQuery UI.
textWhether to show any text -when set to false (display no text), icon must be enabled, otherwise it’ll be ignored.
labelText to show on the button.
sizeSize of the button of type primitives.common.Size.
primitives.orgdiagram.ConfigorgDiagram options class.
Properties
graphicsTypePreferable graphics type.
actualGraphicsTypeActual graphics type.
pageFitModeDefines the way diagram is fit into page.
orientationTypeDiagram orientation.
verticalAlignmentDefines items vertical alignment relative to each other within one level of hierarchy.
horizontalAlignmentDefines items horizontal alignment relative to their parent.
connectorTypeDefines connector lines style for dot and line elements.
emptyDiagramMessageEmpty message in order to avoid blank screen.
rootItemThis is the root of items hierarchy.
highlightItemDefines item having highlight in diagram.
cursorItemDefines item having cursor in diagram.
selectedItemsDefines array of selected items in form of references to items in rootItem hierarchy.
hasSelectorCheckboxThis option controls selection check boxes visibility.
selectionPathModeDefines the way items between rootItem and selectedItems displayed in diagram.
minimalVisibilityDefines the way diagram collapses items when it has not enough space to fit all items.
templatesCustom user templates collection.
defaultTemplateNameThis is template name used to render items having no primitives.orgdiagram.ItemConfig.templateName defined.
hasButtonsThis option controls user buttons visibility.
buttonsCustom user buttons displayed on right side of item.
Events
onHighlightChangingNotifies about changing highlight item primitives.orgdiagram.Config.highlightItem in diagram.
onHighlightChangedNotifies about changed highlight item primitives.orgdiagram.Config.highlightItem in diagram.
onCursorChangingNotifies about changing cursor item primitives.orgdiagram.Config.cursorItem in diagram.
onCursorChangedNotifies about changed cursor item primitives.orgdiagram.Config.cursorItem in diagram .
onSelectionChangingNotifies about changing selected items collection of primitives.orgdiagram.Config.selectedItems.
onSelectionChangedNotifies about changes in collection of primitives.orgdiagram.Config.selectedItems.
onButtonClickNotifies about click of custom user button defined in colelction of primitives.orgdiagram.Config.buttons.
onMouseClickOn mouse click event.
onItemRenderIf user defined custom template for item then this method is called to populate it with context data.
onHighlightRenderIf user defined custom highlight template for item template then this method is called to populate it with context data.
onCursorRenderIf user defined custom cursor template for item template then this method is called to populate it with context data.
Properties
normalLevelShiftDefines interval after level of items in diagram having items in normal state.
dotLevelShiftDefines interval after level of items in diagram having items in dot state.
lineLevelShiftDefines interval after level of items in diagram having items in line state.
normalItemsIntervalDefines interval between items at the same level in diagram having items in normal state.
dotItemsIntervalDefines interval between items at the same level in diagram having items in dot state.
lineItemsIntervalDefines interval between items at the same level in diagram having items in line state.
cousinsIntervalMultiplierUse this interval multiplier for visual children grouping having distinct parents.
Functions
updateMakes full redraw of diagram contents reevaluating all options.
Properties
itemTitleFirstFontColorThis property customizes default template title font color.
itemTitleSecondFontColorDefault template title second font color.
selectCheckBoxLabelSelect check box label.
linesColorConnectors lines color.
linesWidthConnectors lines width.
showCalloutThis option controls callout visibility for dotted items.
defaultCalloutTemplateNameThis is template name used to render callouts for dotted items.
calloutfillColorAnnotation callout fill color.
calloutBorderColorAnnotation callout border color.
calloutOffsetAnnotation callout offset.
calloutCornerRadiusAnnotation callout corner radius.
calloutPointerWidthAnnotation callout pointer base width.
calloutLineWidthAnnotation callout border line width.
calloutOpacityAnnotation callout opacity.
childrenPlacementTypeDefines children placement form.
leavesPlacementTypeDefines leaves placement form.
maximumColumnsInMatrixMaximum number of columns for matrix leaves layout.
buttonsPanelSizeUser buttons panel size.
groupTitlePanelSizeGroup title panel size.
checkBoxPanelSizeSelection check box panel size.
minimumScaleMinimum CSS3 scale transform.
maximumScaleMaximum CSS3 scale transform.
showLabelsThis option controls items labels visibility.
labelSizeDefines label size.
labelOffsetDefines label offset from dot in pixels.
labelOrientationDefines label orientation.
labelPlacementDefines label placement relative to its dot.
labelFontSizeLabel font size.
labelFontFamilyLabel font family.
labelColorLabel color.
labelFontWeightFont weight: normal | bold
labelFontStyleFont style: normal | italic
enablePanningEnable chart panning with mouse drag & drop for desktop browsers.
primitives.orgdiagram.ItemConfigDefines item in diagram hierarchy.
Properties
titleDefault template title property.
descriptionDefault template description element.
imageUrl to image.
itemTitleColorDefault template title background color.
groupTitleAuxiliary group title property.
groupTitleColorGroup title background color.
isVisibleIf it is true then item is shown and selectable in hierarchy.
hasSelectorCheckboxIf it is true then selection check box is shown for the item.
hasButtonsThis option controls buttons panel visibility.
itemTypeThis property defines how item should be shown.
adviserPlacementTypeIn case of item types primitives.orgdiagram.ItemType.Assistant and primitives.orgdiagram.ItemType.Adviser this option defines item placement side relative to parent.
childrenPlacementTypeDefines children placement form.
itemsThis is collection of children items.
templateNameThis is template name used to render this item.
showCalloutThis option controls items callout visibility.
calloutTemplateNameThis is template name used to render callout for dotted item.
labelItems label text.
showLabelThis option controls items label visibility.
labelSizeDefines label size.
labelOrientationDefines label orientation.
labelPlacementDefines label placement relative to the item.

Functions

primitives.common.isNullOrEmpty

primitives.common.isNullOrEmpty = function (value)

Indicates whether the specified string is null or an Empty string.

Parameters

valueThe string to test.  Returns: true if the value is null or an empty string(“”); otherwise, false.

primitives.common.hashCode

primitives.common.hashCode = function (value)

Returns hash code for specified string value.

Parameters

valueThe string to calculate hash code.  Returns: int hash code.

primitives.common.attr

primitives.common.attr = function (element,
attr)

This method assigns HTML element attributes only if one of them does not match its current value.  This function helps to reduce number of HTML page layout invalidations.

Parameters

elementjQuery selector of element to be updated.
attrobject containg attributes and new values.

primitives.common.css

primitives.common.css = function (element,
attr)

This method assigns HTML element style attributes only if one of them does not match its current value.  This function helps to reduce number of HTML page layout invalidations.

Parameters

elementjQuery selector of element to be updated.
attrobject containing style attributes.

primitives.common.stopPropogation

This method uses various approaches used in different browsers to stop event propagation.  Parameters: event - Event to be stopped.

primitives.common.indexOf

primitives.common.indexOf = function (vector,
item)

This method searches array for specified item and returns index (or -1 if not found) Parameters: vector - An array through which to search. item - The value to search for.  Returns: Index of search item or -1 if not found.

primitives.common.supportsSVG

primitives.common.supportsSVG = function ()

Indicates whether the browser supports SVG graphics.

Returns

true if browser supports SVG graphics.

primitives.common.supportsVML

primitives.common.supportsVML = function ()

Indicates whether the browser supports VML graphics.  It is applicable to Internet Explorer only.  This graphics mode is depricated in favour of SVG.

Returns

true if browser supports VML graphics.

primitives.common.supportsCanvas

primitives.common.supportsCanvas = function ()

Indicates whether the browser supports HTML Canvas graphics.

Returns

true if browser supports HTML Canvas graphics.

primitives.common.getColorHexValue

primitives.common.getColorHexValue = function (color)

Converts color string into HEX color string.

Parameters

colorregular HTML color string.

Returns

Color value in form of HEX string.

primitives.common.getColorName

primitives.common.getColorName = function (color)

Converts color string into HTML color name string or return hex color string.

Parameters

colorregular HTML color string.

Returns

HTML Color name or HEX string.

primitives.common.getRed

primitives.common.getRed = function (color)

Gets red value of HEX color string.

Parameters

colorHEX string color value.

Returns

Int value.

primitives.common.getGreen

primitives.common.getGreen = function (color)

Gets green value of HEX color string.

Parameters

colorHEX string color value.

Returns

Int value.

primitives.common.getBlue

primitives.common.getBlue = function (color)

Gets blue value of HEX color string.

Parameters

colorHEX string color value.

Returns

Int value.

primitives.common.beforeOpacity

primitives.common.beforeOpacity = function (color,
opacity)

Calculates before opacity color value producing color you need after applying opacity.

Parameters

colorColor you need after applying opacity.
opacityValue of opacity.

Returns

HEX color value.

primitives.common.highestContrast

primitives.common.highestContrast = function (baseColor,
firstColor,
secondColor)

This function calculates contrast between base color and two optional first and second colors and returns optional color having highest contrast.

Parameters

baseColorBase color to compare with.
firstColorFirst color.
secondColorSecond color.

Returns

Color value.

primitives.common.luminosity

primitives.common.luminosity = function (firstColor,
secondColor)

This function calculates luminosity between two HEX string colors.

Parameters

firstColorFirst color.
secondColorSecond color.

Returns

Luminosity value

Enumerations

primitives.orgdiagram.AdviserPlacementType

Defines item placement in tree relative to parent.

AutoLayout manager defined.
LeftItem placed on the left side of parent.
RightItem placed on the right side of parent.

primitives.orgdiagram.UpdateMode

Defines redraw mode of diagram.

RecreateForce widget to make a full redraw.
RefreshThis update mode is optimized for widget fast redraw caused by resize or changes of next options: primitives.orgdiagram.Config.rootItem, primitives.orgdiagram.Config.cursorItem or primitives.orgdiagram.Config.selectedItems.
PositonHighlightThis update mode redraws only primitives.orgdiagram.Config.highlightItem.

See Also

primitives.orgdiagram.Config.update

primitives.text.TextOrientationType

Defines label orientation type.

HorizontalRegular horizontal text.
RotateLeftRotate all text 90 degree.
RotateRightRotate all text 270 degree.

primitives.orgdiagram.SelectionPathMode

Defines the display mode for items between root item of diagram and selected items.

NoneSelection path items placed and sized as regular diagram items.
FullStackSelection path items are shown in normal template mode.

primitives.common.RenderingMode

This enumeration is used as option in arguments of rendering events.  It helps to tell template initialization stage, for example user can widgitize some parts of template on create and update and refresh them in template update stage.

CreateTemplate is just created.
UpdateTemplate is reused and update needed.

primitives.common.PlacementType

Defines element placement relative to rectangular area.

AutoDepends on implementation
LeftLeft side
TopTop side
RightRight side
BottomBottom side
TopLeftTop left side
TopRightTop right side
BottomLeftBottom left side
BottomRightBottom right side

primitives.orgdiagram.PageFitMode

Defines diagram auto fit mode.

NoneAll diagram items are shown in normal template mode.
PageWidthDiagram tries to layout and auto size items in order to fit diagram into available page width.
PageHeightDiagram tries to layout and auto size items in order to fit diagram into available page height.
FitToPageDiagram tries to layout and auto size items in order to fit diagram into available page size.

primitives.orgdiagram.OrientationType

Defines diagram orientation type.

TopVertical orientation having root item at the top.
BottomVertical orientation having root item at the bottom.
LeftHorizontal orientation having root item on the left.
RightHorizontal orientation having root item on the right.

primitives.orgdiagram.ItemType

Defines diagram item type.

RegularRegular item.
InvisibleRegular invisible item.
AssistantChild item which is placed at separate level above all other children, but below parent item.  It has connection on its side.
AdviserChild item which is placed at the same level as parent item.  It has connection on its side.
SubAssistantChild item which is placed at separate level above all other children, but below parent item.  It has connection on its top.
SubAdviserChild item which is placed at the same level as parent item.  It has connection on its top.

primitives.common.HorizontalAlignmentType

Defines text label alignment inside text box boundaries.

CenterPositooned in the middle of the text box
LeftAligned to the begging of the text box
RightAligned to the end of text box

primitives.ocommon.GraphicsType

Graphics type.

VMLVector Markup Language.  It is only graphics mode available in IE6, IE7 and IE8.
SVGScalable Vector Graphics.  Proportionally scales on majority of device.  It is not available on Android 2.3 devices and earlier.
CanvasHTML canvas graphics.  It is available everywhere except IE6, IE7 and IE8.  It requires widget redraw after zooming page.

primitives.common.Enabled

Defines option state.

AutoOption state is auto defined.
TrueEnabled.
FalseDisabled.

primitives.orgdiagram.ConnectorType

Defines diagram connectors style for dot and line elements.

SquaredConnector lines use only right angles.
AngularConnector lines use angular lines comming from common vertex.
CurvedConnector lines are splines comming from common vertex.

primitives.common.Colors

Named colors.

primitives.orgdiagram.ChildrenPlacementType

Defines children placement shape.

AutoChildren placement auto defined.
VerticalChildren form vertical column.
HorizontalChildren placed horizontally.
MatrixChildren placed in form of matrix.

primitives.common.VerticalAlignmentType

Defines text label alignment inside text box boundaries.

CenterPositooned in the middle of the text box
LeftAligned to the begging of the text box
RightAligned to the end of text box

primitives.orgdiagram.Visibility

Defines nodes visibility mode.

AutoAuto select best visibility mode.
NormalShow node in normal template mode.
DotShow node as dot.
LineShow node as line.
InvisibleMake node invisible.

See Also

primitives.orgdiagram.Config.minimalVisibility

primitives.orgdiagram.EventArgs

Event details class.

Summary
Properties
oldContextReference to associated previous item in rootItem hierarchy.
contextReference to associated new item in rootItem hierarchy.
parentItemReference parent item of item in context.
positionAbsolute item position on diagram.
nameRelative object name.
cancelAllows cancelation of coupled event processing.

Properties

oldContext

Reference to associated previous item in rootItem hierarchy.

context

Reference to associated new item in rootItem hierarchy.

parentItem

Reference parent item of item in context.

position

Absolute item position on diagram.

See also

primitives.common.Rect

name

Relative object name.

cancel

Allows cancelation of coupled event processing.  This option allows to cancel layout update and subsequent primitives.orgdiagram.Config.onCursorChanged event in handler of primitives.orgdiagram.Config.onCursorChanging event.

primitives.common.RenderEventArgs

Rendering event details class.

Summary
Properties
elementjQuery selector referencing template’s root element.
contextReference to itemConfig.
templateNameThis is template name used to render this item.
renderingModeThis option indicates current template state.
isCursorRendered item is cursor.
isSelectedRendered item is selected.

Properties

element

jQuery selector referencing template’s root element.

context

Reference to itemConfig.

templateName

This is template name used to render this item.

See Also

primitives.orgdiagram.TemplateConfig primitives.orgdiagram.Config.templates collection property.

renderingMode

This option indicates current template state.

Default

primitives.common.RenderingMode.Update

See also

primitives.common.RenderingMode

isCursor

Rendered item is cursor.

isSelected

Rendered item is selected.

primitives.common.Point

Class represents pair of x and y coordinates that defines a point in 2D plane.

Parameters

pointprimitives.common.Point object.

Parameters

xX coordinate of 2D point.
yY coordinate of 2D point.
Summary
Properties
xThe x coordinate.
yThe y coordinate.
Functions
distanceToReturns distance to point.
toStringReturns rectangle location in form of CSS style string.

Properties

x

The x coordinate.

y

The y coordinate.

Functions

distanceTo

primitives.common.Point.prototype.distanceTo = function (arg0,
arg1)

Returns distance to point.

Parameters

pointprimitives.common.Point object.

Parameters

xX coordinate of 2D point.
yY coordinate of 2D point.

toString

primitives.common.Point.prototype.toString = function (units)

Returns rectangle location in form of CSS style string.

Parameters

unitsThe string name of units.  Uses “px” if not defined.

Returns

CSS style string.

primitives.common.Rect

Class describes the width, height and location of rectangle.

Parameters

rectCopy constructor.  It takes as a parameter copy of primitives.common.Rect object.

Parameters

pointTopLeftTop left point primitives.common.Point object.
pointBottomRightBottom right point primitives.common.Point object.

Parameters

xThe x coordinate of top left corner.
yThe y coordinate of top left corner.
widthRect width.
heightRect height.
Summary
Properties
xThe location x coordinate.
yThe location y coordinate.
widthThe width of rectangle.
heightThe height of rectangle.
Functions
leftGets the x-axis value of the left side of the rectangle.
topGets the y-axis value of the top side of the rectangle.
rightGets the x-axis value of the right side of the rectangle.
bottomGets the y-axis value of the bottom of the rectangle.
verticalCenterGets the y-axis value of the center point of the rectangle.
horizontalCenterGets the x-axis value of the center point of the rectangle.
isEmptyGets the value that indicates whether the rectangle is the Empty rectangle.
offsetExpands the rectangle by using specified value in all directions.
translateMoves the rectangle to by the specified horizontal and vertical amounts.
invertInverts rectangle.
containsIndicates whether the rectangle contains the specified point.
cropByRectCrops the rectangle by the boundaries of specified rectangle.
overlapsReturns true if the rectangle overlaps specified rectangle.
addRectExpands the current rectangle to contain specified rectangle.
getCSSReturns rectangle location and size in form of CSS style object.
toStringReturns rectangle location and size in form of CSS style string.

Properties

x

The location x coordinate.

y

The location y coordinate.

width

The width of rectangle.

height

The height of rectangle.

Functions

left

primitives.common.Rect.prototype.left = function ()

Gets the x-axis value of the left side of the rectangle.

top

primitives.common.Rect.prototype.top = function ()

Gets the y-axis value of the top side of the rectangle.

right

primitives.common.Rect.prototype.right = function ()

Gets the x-axis value of the right side of the rectangle.

bottom

primitives.common.Rect.prototype.bottom = function ()

Gets the y-axis value of the bottom of the rectangle.

verticalCenter

primitives.common.Rect.prototype.verticalCenter = function ()

Gets the y-axis value of the center point of the rectangle.

horizontalCenter

primitives.common.Rect.prototype.horizontalCenter = function ()

Gets the x-axis value of the center point of the rectangle.

isEmpty

primitives.common.Rect.prototype.isEmpty = function ()

Gets the value that indicates whether the rectangle is the Empty rectangle.

offset

primitives.common.Rect.prototype.offset = function (arg0,
arg1,
arg2,
arg3)

Expands the rectangle by using specified value in all directions.

Parameters

valueThe amount by which to expand or shrink the sides of the rectangle.

Parameters

leftThe amount by which to expand or shrink the left side of the rectangle.
topThe amount by which to expand or shrink the top side of the rectangle.
rightThe amount by which to expand or shrink the right side of the rectangle.
bottomThe amount by which to expand or shrink the bottom side of the rectangle.

translate

primitives.common.Rect.prototype.translate = function (x,
y)

Moves the rectangle to by the specified horizontal and vertical amounts.

Parameters

xThe amount to move the rectangle horizontally.
yThe amount to move the rectangle vertically.

invert

primitives.common.Rect.prototype.invert = function ()

Inverts rectangle.

contains

primitives.common.Rect.prototype.contains = function (arg0,
arg1)

Indicates whether the rectangle contains the specified point.

Parameters

pointThe point to check.

Parameters

xThe x coordinate of the point to check.
yThe y coordinate of the point to check.

Returns

true if the rectangle contains the specified point; otherwise, false.

cropByRect

primitives.common.Rect.prototype.cropByRect = function (rect)

Crops the rectangle by the boundaries of specified rectangle.

Parameters

rectThe rectangle to use as the crop boundaries.

overlaps

primitives.common.Rect.prototype.overlaps = function (rect)

Returns true if the rectangle overlaps specified rectangle.

Parameters

rectThe rectangle to use as overlaping rectangle.

addRect

primitives.common.Rect.prototype.addRect = function (arg0,
arg1,
arg2,
arg3)

Expands the current rectangle to contain specified rectangle.

Parameters

rectThe rectangle to contain.

Parameters

xThe x coordinate of the point to contain.
yThe y coordinate of the point to contain.

Parameters

xThe x coordinate of top left corner.
yThe y coordinate of top left corner.
widthRect width.
heightRect height.

getCSS

primitives.common.Rect.prototype.getCSS = function (units)

Returns rectangle location and size in form of CSS style object.

Parameters

unitsThe string name of units.  Uses “px” if not defined.

Returns

CSS style object.

toString

primitives.common.Rect.prototype.toString = function (units)

Returns rectangle location and size in form of CSS style string.

Parameters

unitsThe string name of units.  Uses “px” if not defined.

Returns

CSS style string.

primitives.common.Size

Class describes the size of an object.

Parameters

sizeCopy constructor.  It takes as a parameter copy of primitives.common.Size object.

Parameters

widthThe initial width of the instance.
heightThe initial height of the instance.
Summary
Properties
widthThe value that specifies the width of the size class.
heightThe value that specifies the height of the size class.
Functions
invertSwaps width and height.

Properties

width

The value that specifies the width of the size class.

height

The value that specifies the height of the size class.

Functions

invert

primitives.common.Size.prototype.invert = function ()

Swaps width and height.

primitives.common.Thickness

Class describes the thickness of a frame around rectangle.

Parameters

leftThe thickness for the left side of the rectangle.
heightThe thickness for the upper side of the rectangle.
rightThe thickness for the right side of the rectangle.
bottomThe thickness for the bottom side of the rectangle.
Summary
Properties
leftThe thickness for the left side of the rectangle.
topThe thickness for the upper side of the rectangle.
rightThe thickness for the right side of the rectangle.
bottomThe thickness for the bottom side of the rectangle.
Functions
isEmptyGets the value that indicates whether the thickness is the Empty.
toStringReturns thickness in form of CSS style string.

Properties

left

The thickness for the left side of the rectangle.

top

The thickness for the upper side of the rectangle.

right

The thickness for the right side of the rectangle.

bottom

The thickness for the bottom side of the rectangle.

Functions

isEmpty

primitives.common.Thickness.prototype.isEmpty = function ()

Gets the value that indicates whether the thickness is the Empty.

toString

primitives.common.Thickness.prototype.toString = function (units)

Returns thickness in form of CSS style string.  It is conversion to padding style string.

Parameters

unitsThe string name of units.  Uses “px” if not defined.

Returns

CSS style string.

primitives.text.Config

Text options class.

Summary
Properties
graphicsTypePreferable graphics type.
actualGraphicsTypeActual graphics type.
textDirectionDirection style.
textText
verticalAlignmentVertical alignment.
horizontalAlignmentHorizontal alignment.
fontSizeFont size.
fontFamilyFont family.
colorColor.
Font weight.Font weight: normal | bold
Font style.Font style: normal | italic
Functions
updateMakes full redraw of text widget contents reevaluating all options.

Properties

graphicsType

Preferable graphics type.  If preferred graphics type is not supported widget switches to first available.

Default

<primitives.common.GraphicsType.SVG>

actualGraphicsType

Actual graphics type.

textDirection

Direction style.

Default

<primitives.text.TextDirection.Auto>

text

Text

verticalAlignment

horizontalAlignment

fontSize

Font size.

Default

15

fontFamily

Font family.

Default

”Arial”

color

Color.

Default

<primitives.common.Colors.Black>

Font weight.

Font weight: normal | bold

Default

”normal”

Font style.

Font style: normal | italic

Default

”normal”

Functions

update

Makes full redraw of text widget contents reevaluating all options.

primitives.callout.Config

Callout options class.

Summary
Properties
graphicsTypePreferable graphics type.
actualGraphicsTypeActual graphics type.
pointerPlacementDefines pointer connection side or corner.
positionDefines callout body position.
snapPointCallout snap point.
cornerRadiusBody corner radius in percents or pixels.
offsetBody rectangle offset.
opacityBackground color opacity.
lineWidthBorder line width.
pointerWidthPointer base width in percents or pixels.
borderColorBorder Color.
fillColorFill Color.
Functions
updateMakes full redraw of callout widget contents reevaluating all options.

Properties

graphicsType

Preferable graphics type.  If preferred graphics type is not supported widget switches to first available.

Default

<primitives.common.GraphicsType.SVG>

actualGraphicsType

Actual graphics type.

pointerPlacement

Defines pointer connection side or corner.

Default

primitives.common.PlacementType.Auto

position

Defines callout body position.

Type

primitives.common.Rect.

snapPoint

Callout snap point.

Type

primitives.common.Point.

cornerRadius

Body corner radius in percents or pixels.

offset

Body rectangle offset.

opacity

Background color opacity.

lineWidth

Border line width.

pointerWidth

Pointer base width in percents or pixels.

borderColor

Border Color.

Default

<primitives.common.Colors.Black>

fillColor

Fill Color.

Default

<primitives.common.Colors.Gray>

Functions

update

Makes full redraw of callout widget contents reevaluating all options.

primitives.orgdiagram.TemplateConfig

User defines item template class.  It may optionaly define template for item, custom cursor and highlight.  If template is null then default template is used.

See Also

primitives.orgdiagram.Config.templates

Summary
Properties
nameEvery template should have unique name.
itemSizeThis is item size of type primitives.common.Size, templates should have fixed size, so orgDiagram uses this value in order to layout items properly.
itemBorderWidthItem template border width.
itemTemplateItem template, if it is null then default item template is used.
minimizedItemSizeThis is size dot used to display item in minimized form, type of primitives.common.Size.
highlightPaddingThis padding around item defines relative size of highlight object, ts type is primitives.common.Thickness.
highlightBorderWidthHighlight border width.
highlightTemplateHighlight template, if it is null then default highlight template is used.
cursorPaddingThis padding around item defines relative size of cursor object, its type is primitives.common.Thickness.
cursorBorderWidthCursor border width.
cursorTemplateCursor template, if it is null then default cursor template is used.

Properties

name

Every template should have unique name.  It is used as reference when custom template is defined in primitives.orgdiagram.ItemConfig.templateName.

itemSize

This is item size of type primitives.common.Size, templates should have fixed size, so orgDiagram uses this value in order to layout items properly.

itemBorderWidth

Item template border width.

itemTemplate

Item template, if it is null then default item template is used.  It supposed to be div html element containing named elements inside for setting them in primitives.orgdiagram.Config.onItemRender event.

minimizedItemSize

This is size dot used to display item in minimized form, type of primitives.common.Size.

highlightPadding

This padding around item defines relative size of highlight object, ts type is primitives.common.Thickness.

highlightBorderWidth

Highlight border width.

highlightTemplate

Highlight template, if it is null then default highlight template is used.  It supposed to be div html element containing named elements inside for setting them in primitives.orgdiagram.Config.onHighlightRender event.

cursorPadding

This padding around item defines relative size of cursor object, its type is primitives.common.Thickness.

cursorBorderWidth

Cursor border width.

cursorTemplate

Cursor template, if it is null then default cursor template is used.  It supposed to be div html element containing named elements inside for setting them in primitives.orgdiagram.Config.onCursorRender event.

primitives.orgdiagram.ButtonConfig

Options class.  Custom user button options class.  Buttons displayed on the right side of item.  See jQuery UI Button options description for details.  In order to receive button click event make binding to primitives.orgdiagram.Config.onButtonClick.

See Also

primitives.orgdiagram.Config.buttons

Summary
Properties
nameIt should be unique string name of the button.
iconName of icon used in jQuery UI.
textWhether to show any text -when set to false (display no text), icon must be enabled, otherwise it’ll be ignored.
labelText to show on the button.
sizeSize of the button of type primitives.common.Size.

Properties

name

It should be unique string name of the button.  It is needed to distinguish click events from different butons.

icon

Name of icon used in jQuery UI.

text

Whether to show any text -when set to false (display no text), icon must be enabled, otherwise it’ll be ignored.

label

Text to show on the button.

size

Size of the button of type primitives.common.Size.

primitives.orgdiagram.Config

orgDiagram options class.

Summary
Properties
graphicsTypePreferable graphics type.
actualGraphicsTypeActual graphics type.
pageFitModeDefines the way diagram is fit into page.
orientationTypeDiagram orientation.
verticalAlignmentDefines items vertical alignment relative to each other within one level of hierarchy.
horizontalAlignmentDefines items horizontal alignment relative to their parent.
connectorTypeDefines connector lines style for dot and line elements.
emptyDiagramMessageEmpty message in order to avoid blank screen.
rootItemThis is the root of items hierarchy.
highlightItemDefines item having highlight in diagram.
cursorItemDefines item having cursor in diagram.
selectedItemsDefines array of selected items in form of references to items in rootItem hierarchy.
hasSelectorCheckboxThis option controls selection check boxes visibility.
selectionPathModeDefines the way items between rootItem and selectedItems displayed in diagram.
minimalVisibilityDefines the way diagram collapses items when it has not enough space to fit all items.
templatesCustom user templates collection.
defaultTemplateNameThis is template name used to render items having no primitives.orgdiagram.ItemConfig.templateName defined.
hasButtonsThis option controls user buttons visibility.
buttonsCustom user buttons displayed on right side of item.
Events
onHighlightChangingNotifies about changing highlight item primitives.orgdiagram.Config.highlightItem in diagram.
onHighlightChangedNotifies about changed highlight item primitives.orgdiagram.Config.highlightItem in diagram.
onCursorChangingNotifies about changing cursor item primitives.orgdiagram.Config.cursorItem in diagram.
onCursorChangedNotifies about changed cursor item primitives.orgdiagram.Config.cursorItem in diagram .
onSelectionChangingNotifies about changing selected items collection of primitives.orgdiagram.Config.selectedItems.
onSelectionChangedNotifies about changes in collection of primitives.orgdiagram.Config.selectedItems.
onButtonClickNotifies about click of custom user button defined in colelction of primitives.orgdiagram.Config.buttons.
onMouseClickOn mouse click event.
onItemRenderIf user defined custom template for item then this method is called to populate it with context data.
onHighlightRenderIf user defined custom highlight template for item template then this method is called to populate it with context data.
onCursorRenderIf user defined custom cursor template for item template then this method is called to populate it with context data.
Properties
normalLevelShiftDefines interval after level of items in diagram having items in normal state.
dotLevelShiftDefines interval after level of items in diagram having items in dot state.
lineLevelShiftDefines interval after level of items in diagram having items in line state.
normalItemsIntervalDefines interval between items at the same level in diagram having items in normal state.
dotItemsIntervalDefines interval between items at the same level in diagram having items in dot state.
lineItemsIntervalDefines interval between items at the same level in diagram having items in line state.
cousinsIntervalMultiplierUse this interval multiplier for visual children grouping having distinct parents.
Functions
updateMakes full redraw of diagram contents reevaluating all options.
Properties
itemTitleFirstFontColorThis property customizes default template title font color.
itemTitleSecondFontColorDefault template title second font color.
selectCheckBoxLabelSelect check box label.
linesColorConnectors lines color.
linesWidthConnectors lines width.
showCalloutThis option controls callout visibility for dotted items.
defaultCalloutTemplateNameThis is template name used to render callouts for dotted items.
calloutfillColorAnnotation callout fill color.
calloutBorderColorAnnotation callout border color.
calloutOffsetAnnotation callout offset.
calloutCornerRadiusAnnotation callout corner radius.
calloutPointerWidthAnnotation callout pointer base width.
calloutLineWidthAnnotation callout border line width.
calloutOpacityAnnotation callout opacity.
childrenPlacementTypeDefines children placement form.
leavesPlacementTypeDefines leaves placement form.
maximumColumnsInMatrixMaximum number of columns for matrix leaves layout.
buttonsPanelSizeUser buttons panel size.
groupTitlePanelSizeGroup title panel size.
checkBoxPanelSizeSelection check box panel size.
minimumScaleMinimum CSS3 scale transform.
maximumScaleMaximum CSS3 scale transform.
showLabelsThis option controls items labels visibility.
labelSizeDefines label size.
labelOffsetDefines label offset from dot in pixels.
labelOrientationDefines label orientation.
labelPlacementDefines label placement relative to its dot.
labelFontSizeLabel font size.
labelFontFamilyLabel font family.
labelColorLabel color.
labelFontWeightFont weight: normal | bold
labelFontStyleFont style: normal | italic
enablePanningEnable chart panning with mouse drag & drop for desktop browsers.

Properties

graphicsType

Preferable graphics type.  If preferred graphics type is not supported widget switches to first available.

Default

<primitives.common.GraphicsType.SVG>

actualGraphicsType

Actual graphics type.

pageFitMode

Defines the way diagram is fit into page.

Default

primitives.orgdiagram.PageFitMode.FitToPage

orientationType

verticalAlignment

Defines items vertical alignment relative to each other within one level of hierarchy.  It does not affect levels having same size items.

Default

<primitives.common.VerticalAlignmentType.Middle>

horizontalAlignment

Defines items horizontal alignment relative to their parent.

Default

primitives.common.HorizontalAlignmentType.Center

connectorType

Defines connector lines style for dot and line elements.

Default

primitives.orgdiagram.ConnectorType.Angular

emptyDiagramMessage

Empty message in order to avoid blank screen.

rootItem

This is the root of items hierarchy.

highlightItem

Defines item having highlight in diagram.  Reference to item in rootItem hierarchy.  If it is null then no highlight shown on diagram.

cursorItem

Defines item having cursor in diagram.  Reference to item in rootItem hierarchy.  If it is null then no cursor shown on diagram.

selectedItems

Defines array of selected items in form of references to items in rootItem hierarchy.  Selected items are always show in normal mode.

hasSelectorCheckbox

This option controls selection check boxes visibility.

AutoCursor item only.
TrueEvery normal item has seelction check box.
FalseNo selection check boxes.

Default

primitives.common.Enabled.Auto

selectionPathMode

Defines the way items between rootItem and selectedItems displayed in diagram.

Default

primitives.orgdiagram.SelectionPathMode.FullStack

minimalVisibility

Defines the way diagram collapses items when it has not enough space to fit all items.

Default

primitives.orgdiagram.Visibility.Dot

templates

Custom user templates collection.  Every template config should have unique name property.

See also

primitives.orgdiagram.TemplateConfig primitives.orgdiagram.Config.defaultTemplateName primitives.orgdiagram.ItemConfig.templateName

defaultTemplateName

This is template name used to render items having no primitives.orgdiagram.ItemConfig.templateName defined.

See Also

primitives.orgdiagram.TemplateConfig primitives.orgdiagram.Config.templates collection property.

hasButtons

This option controls user buttons visibility.

AutoCursor item only when buttons defined.
TrueEvery normal item has seelction check box.
FalseNo selection check boxes.

Default

primitives.common.Enabled.Auto

buttons

Custom user buttons displayed on right side of item.

See also

primitives.orgdiagram.ButtonConfig

Events

onHighlightChanging

Notifies about changing highlight item primitives.orgdiagram.Config.highlightItem in diagram.  This coupled event with primitives.orgdiagram.Config.onHighlightChanged, it is fired before highlight update.

See also

primitives.orgdiagram.EventArgs

onHighlightChanged

Notifies about changed highlight item primitives.orgdiagram.Config.highlightItem in diagram.

See also

primitives.orgdiagram.EventArgs

onCursorChanging

Notifies about changing cursor item primitives.orgdiagram.Config.cursorItem in diagram.  This coupled event with primitives.orgdiagram.Config.onCursorChanged, it is fired before layout update.

See also

primitives.orgdiagram.EventArgs

onCursorChanged

Notifies about changed cursor item primitives.orgdiagram.Config.cursorItem in diagram .

See also

primitives.orgdiagram.EventArgs

onSelectionChanging

Notifies about changing selected items collection of primitives.orgdiagram.Config.selectedItems.

See also

primitives.orgdiagram.EventArgs

onSelectionChanged

Notifies about changes in collection of primitives.orgdiagram.Config.selectedItems.

See also

primitives.orgdiagram.EventArgs

onButtonClick

Notifies about click of custom user button defined in colelction of primitives.orgdiagram.Config.buttons.

See also

primitives.orgdiagram.EventArgs

onMouseClick

On mouse click event.

See also

primitives.orgdiagram.EventArgs

onItemRender

If user defined custom template for item then this method is called to populate it with context data.

See also

primitives.common.RenderEventArgs

onHighlightRender

If user defined custom highlight template for item template then this method is called to populate it with context data.

See also

primitives.common.RenderEventArgs

onCursorRender

If user defined custom cursor template for item template then this method is called to populate it with context data.

See also

primitives.common.RenderEventArgs

Properties

normalLevelShift

Defines interval after level of items in diagram having items in normal state.

See also

primitives.common.RenderEventArgs

dotLevelShift

Defines interval after level of items in diagram having items in dot state.

lineLevelShift

Defines interval after level of items in diagram having items in line state.

normalItemsInterval

Defines interval between items at the same level in diagram having items in normal state.

dotItemsInterval

Defines interval between items at the same level in diagram having items in dot state.

lineItemsInterval

Defines interval between items at the same level in diagram having items in line state.

cousinsIntervalMultiplier

Use this interval multiplier for visual children grouping having distinct parents.

Functions

update

Makes full redraw of diagram contents reevaluating all options.

Parameters

updateMode: Parameter defines the way diagram should be updated primitives.orgdiagram.UpdateMode.  For example primitives.orgdiagram.UpdateMode.Refresh updates only items and selection reusing existing elements where ever it is possible.

Properties

itemTitleFirstFontColor

This property customizes default template title font color.  Item background color sometimes play a role of logical value and can vary over a wide range, so as a result title having default font color may become unreadable.  Widgets selects the best font color between this option and primitives.orgdiagram.Config.itemTitleSecondFontColor.

See Also

primitives.orgdiagram.ItemConfig.itemTitleColor primitives.orgdiagram.Config.itemTitleSecondFontColor primitives.common.highestContrast

itemTitleSecondFontColor

Default template title second font color.

selectCheckBoxLabel

Select check box label.

linesColor

Connectors lines color.

linesWidth

Connectors lines width.

showCallout

This option controls callout visibility for dotted items.

Default

true

defaultCalloutTemplateName

This is template name used to render callouts for dotted items.  Actual callout template name is defined by following sequence: primitives.orgdiagram.ItemConfig.calloutTemplateName primitives.orgdiagram.ItemConfig.templateName primitives.orgdiagram.Config.defaultCalloutTemplateName primitives.orgdiagram.Config.defaultTemplateName

See Also

primitives.orgdiagram.Config.templates collection property.  Default: null

calloutfillColor

Annotation callout fill color.

calloutBorderColor

Annotation callout border color.

calloutOffset

Annotation callout offset.

calloutCornerRadius

Annotation callout corner radius.

calloutPointerWidth

Annotation callout pointer base width.

calloutLineWidth

Annotation callout border line width.

calloutOpacity

Annotation callout opacity.

childrenPlacementType

Defines children placement form.

leavesPlacementType

Defines leaves placement form.  Leaves are children having no sub children.

maximumColumnsInMatrix

Maximum number of columns for matrix leaves layout.  Leaves are children having no sub children.

buttonsPanelSize

User buttons panel size.

groupTitlePanelSize

Group title panel size.

checkBoxPanelSize

Selection check box panel size.

minimumScale

Minimum CSS3 scale transform.  Available on mobile safary only.

maximumScale

Maximum CSS3 scale transform.  Available on mobile safary only.

showLabels

This option controls items labels visibility.  Labels are displayed in form of divs having text inside, long strings are wrapped inside of them.  User can control labels position relative to its item.  Chart does not preserve space for labels, so if they overlap each other then horizontal or vertical intervals between rows and items shoud be manually increased.

Autodepends on available space.
Truealways shown.
Falsehidden.

See Also

primitives.orgdiagram.ItemConfig.label primitives.orgdiagram.Config.labelSize primitives.orgdiagram.Config.normalItemsInterval primitives.orgdiagram.Config.dotItemsInterval primitives.orgdiagram.Config.lineItemsInterval primitives.orgdiagram.Config.normalLevelShift primitives.orgdiagram.Config.dotLevelShift primitives.orgdiagram.Config.lineLevelShift

Default

primitives.common.Enabled.Auto

labelSize

Defines label size.  It is needed to avoid labels overlapping.  If one label overlaps another label or item it will be hidden.  Label string is wrapped when its length exceeds available width.

Default

new <primitives.common.Size>(80, 24);

labelOffset

Defines label offset from dot in pixels.

Default

1;

labelOrientation

labelPlacement

Defines label placement relative to its dot.  Label is aligned to opposite side of its box.

See Also

primitives.common.PlacementType

Default

primitives.common.PlacementType.Top

labelFontSize

Label font size.

Default

10px

labelFontFamily

Label font family.

Default

”Arial”

labelColor

Label color.

Default

primitives.common.Colors.Black

labelFontWeight

Font weight: normal | bold

Default

”normal”

labelFontStyle

Font style: normal | italic

Default

”normal”

enablePanning

Enable chart panning with mouse drag & drop for desktop browsers.

Default

true

primitives.orgdiagram.ItemConfig

Defines item in diagram hierarchy.  User is supposed to create hierarchy of this items and assign it to primitives.orgdiagram.Config.rootItem.  Widget contains some generic properties used in default item template, but user can add as many custom properties to this class as needed.  Just be careful and avoid widget malfunction.

See Also

primitives.orgdiagram.Config.rootItem

Summary
Properties
titleDefault template title property.
descriptionDefault template description element.
imageUrl to image.
itemTitleColorDefault template title background color.
groupTitleAuxiliary group title property.
groupTitleColorGroup title background color.
isVisibleIf it is true then item is shown and selectable in hierarchy.
hasSelectorCheckboxIf it is true then selection check box is shown for the item.
hasButtonsThis option controls buttons panel visibility.
itemTypeThis property defines how item should be shown.
adviserPlacementTypeIn case of item types primitives.orgdiagram.ItemType.Assistant and primitives.orgdiagram.ItemType.Adviser this option defines item placement side relative to parent.
childrenPlacementTypeDefines children placement form.
itemsThis is collection of children items.
templateNameThis is template name used to render this item.
showCalloutThis option controls items callout visibility.
calloutTemplateNameThis is template name used to render callout for dotted item.
labelItems label text.
showLabelThis option controls items label visibility.
labelSizeDefines label size.
labelOrientationDefines label orientation.
labelPlacementDefines label placement relative to the item.

Properties

title

Default template title property.

description

Default template description element.

image

Url to image.  This property is used in default template.

itemTitleColor

Default template title background color.

groupTitle

Auxiliary group title property.  Displayed vertically on the side of item.

groupTitleColor

Group title background color.

isVisible

If it is true then item is shown and selectable in hierarchy.  If item is hidden and it has visible children then only connector line is drawn instead of it.

TrueItem is shown.
FalseItem is hidden.

Default

true

hasSelectorCheckbox

If it is true then selection check box is shown for the item.  Selected items are always shown in normal form, so if item is selected then its selection check box is visible and checked.

AutoDepends on primitives.orgdiagram.Config.hasSelectorCheckbox setting.
TrueSelection check box is visible.
FalseNo selection check box.

Default

primitives.common.Enabled.Auto

hasButtons

This option controls buttons panel visibility.

AutoDepends on primitives.orgdiagram.Config.hasButtons setting.
TrueHas buttons panel.
FalseNo buttons panel.

Default

primitives.common.Enabled.Auto

itemType

This property defines how item should be shown.  So far it is only possible to make it invisible.

See Also

primitives.orgdiagram.ItemType

Deafult

primitives.orgdiagram.ItemType.Regular

adviserPlacementType

In case of item types primitives.orgdiagram.ItemType.Assistant and primitives.orgdiagram.ItemType.Adviser this option defines item placement side relative to parent.  By default items placed on the right side of parent item.

Deafult

primitives.orgdiagram.AdviserPlacementType.Auto

childrenPlacementType

Defines children placement form.

items

This is collection of children items.

See Also

primitives.orgdiagram.ItemConfig

templateName

This is template name used to render this item.

See Also

primitives.orgdiagram.TemplateConfig primitives.orgdiagram.Config.templates collection property.

showCallout

This option controls items callout visibility.

Autodepends on primitives.orgdiagram.Config.showCallout option
Trueshown
Falsehidden

Default

primitives.common.Enabled.Auto

calloutTemplateName

This is template name used to render callout for dotted item.  Actual callout template name is defined by following sequence: primitives.orgdiagram.ItemConfig.calloutTemplateName primitives.orgdiagram.ItemConfig.templateName primitives.orgdiagram.Config.defaultCalloutTemplateName primitives.orgdiagram.Config.defaultTemplateName

See Also

primitives.orgdiagram.Config.templates collection property.  Default: null

label

Items label text.

showLabel

This option controls items label visibility.  Label is displayed in form of div having text inside, long string is wrapped inside of it.  User can control labels position relative to its item.  Chart does not preserve space for label.

Autodepends on primitives.orgdiagram.Config.labelOrientation setting.
Truealways shown.
Falsehidden.

See Also

primitives.orgdiagram.ItemConfig.label primitives.orgdiagram.Config.labelSize

Default

primitives.common.Enabled.Auto

labelSize

Defines label size.  It is needed to avoid labels overlapping.  If one label overlaps another label or item it will be hidden.  Label string is wrapped when its length exceeds available width.  By default it is equal to charts primitives.orgdiagram.Config.labelSize.

See Also

primitives.common.Size Default: null;

labelOrientation

Defines label orientation.  In default <primitives.text.TextOrientationType.Auto> mode it depends on chart primitives.orgdiagram.Config.labelOrientation setting.

See Also

primitives.orgdiagram.Config.labelOrientation primitives.text.TextOrientationType

Default

<primitives.text.TextOrientationType.Auto>

primitives.common.isNullOrEmpty = function (value)
Indicates whether the specified string is null or an Empty string.
primitives.common.hashCode = function (value)
Returns hash code for specified string value.
primitives.common.attr = function (element,
attr)
This method assigns HTML element attributes only if one of them does not match its current value.
primitives.common.css = function (element,
attr)
This method assigns HTML element style attributes only if one of them does not match its current value.
primitives.common.indexOf = function (vector,
item)
This method searches array for specified item and returns index (or -1 if not found) Parameters: vector - An array through which to search.
primitives.common.supportsSVG = function ()
Indicates whether the browser supports SVG graphics.
primitives.common.supportsVML = function ()
Indicates whether the browser supports VML graphics.
primitives.common.supportsCanvas = function ()
Indicates whether the browser supports HTML Canvas graphics.
primitives.common.getColorHexValue = function (color)
Converts color string into HEX color string.
primitives.common.getColorName = function (color)
Converts color string into HTML color name string or return hex color string.
primitives.common.getRed = function (color)
Gets red value of HEX color string.
primitives.common.getGreen = function (color)
Gets green value of HEX color string.
primitives.common.getBlue = function (color)
Gets blue value of HEX color string.
primitives.common.beforeOpacity = function (color,
opacity)
Calculates before opacity color value producing color you need after applying opacity.
primitives.common.highestContrast = function (baseColor,
firstColor,
secondColor)
This function calculates contrast between base color and two optional first and second colors and returns optional color having highest contrast.
primitives.common.luminosity = function (firstColor,
secondColor)
This function calculates luminosity between two HEX string colors.
primitives.common.Point.prototype.distanceTo = function (arg0,
arg1)
Returns distance to point.
primitives.common.Point.prototype.toString = function (units)
Returns rectangle location in form of CSS style string.
primitives.common.Rect.prototype.left = function ()
Gets the x-axis value of the left side of the rectangle.
primitives.common.Rect.prototype.top = function ()
Gets the y-axis value of the top side of the rectangle.
primitives.common.Rect.prototype.right = function ()
Gets the x-axis value of the right side of the rectangle.
primitives.common.Rect.prototype.bottom = function ()
Gets the y-axis value of the bottom of the rectangle.
primitives.common.Rect.prototype.verticalCenter = function ()
Gets the y-axis value of the center point of the rectangle.
primitives.common.Rect.prototype.horizontalCenter = function ()
Gets the x-axis value of the center point of the rectangle.
primitives.common.Rect.prototype.isEmpty = function ()
Gets the value that indicates whether the rectangle is the Empty rectangle.
primitives.common.Rect.prototype.offset = function (arg0,
arg1,
arg2,
arg3)
Expands the rectangle by using specified value in all directions.
primitives.common.Rect.prototype.translate = function (x,
y)
Moves the rectangle to by the specified horizontal and vertical amounts.
primitives.common.Rect.prototype.invert = function ()
Inverts rectangle.
primitives.common.Rect.prototype.contains = function (arg0,
arg1)
Indicates whether the rectangle contains the specified point.
primitives.common.Rect.prototype.cropByRect = function (rect)
Crops the rectangle by the boundaries of specified rectangle.
primitives.common.Rect.prototype.overlaps = function (rect)
Returns true if the rectangle overlaps specified rectangle.
primitives.common.Rect.prototype.addRect = function (arg0,
arg1,
arg2,
arg3)
Expands the current rectangle to contain specified rectangle.
primitives.common.Rect.prototype.getCSS = function (units)
Returns rectangle location and size in form of CSS style object.
primitives.common.Rect.prototype.toString = function (units)
Returns rectangle location and size in form of CSS style string.
primitives.common.Size.prototype.invert = function ()
Swaps width and height.
primitives.common.Thickness.prototype.isEmpty = function ()
Gets the value that indicates whether the thickness is the Empty.
primitives.common.Thickness.prototype.toString = function (units)
Returns thickness in form of CSS style string.
Class describes the size of an object.
Class describes the thickness of a frame around rectangle.
This is template name used to render this item.
Defines item having highlight in diagram.
Defines item having cursor in diagram.
Defines array of selected items in form of references to items in rootItem hierarchy.
Custom user buttons displayed on right side of item.
Child item which is placed at separate level above all other children, but below parent item.
Child item which is placed at the same level as parent item.
This is the root of items hierarchy.
Makes full redraw of diagram contents reevaluating all options.
Defines the way diagram collapses items when it has not enough space to fit all items.
Class describes the width, height and location of rectangle.
Notifies about changed cursor item primitives.orgdiagram.Config.cursorItem in diagram .
Notifies about changing cursor item primitives.orgdiagram.Config.cursorItem in diagram.
User defines item template class.
Custom user templates collection.
Template is reused and update needed.
This enumeration is used as option in arguments of rendering events.
Class represents pair of x and y coordinates that defines a point in 2D plane.
Positooned in the middle of the text box
Positooned in the middle of the text box
Depends on implementation
If user defined custom template for item then this method is called to populate it with context data.
If user defined custom highlight template for item template then this method is called to populate it with context data.
If user defined custom cursor template for item template then this method is called to populate it with context data.
Notifies about click of custom user button defined in colelction of primitives.orgdiagram.Config.buttons.
Diagram tries to layout and auto size items in order to fit diagram into available page size.
Vertical orientation having root item at the top.
Connector lines use angular lines comming from common vertex.
Option state is auto defined.
Selection path items are shown in normal template mode.
Show node as dot.
This is template name used to render items having no primitives.orgdiagram.ItemConfig.templateName defined.
Options class.
Notifies about changed highlight item primitives.orgdiagram.Config.highlightItem in diagram.
Event details class.
Rendering event details class.
Defines redraw mode of diagram.
This update mode is optimized for widget fast redraw caused by resize or changes of next options: primitives.orgdiagram.Config.rootItem, primitives.orgdiagram.Config.cursorItem or primitives.orgdiagram.Config.selectedItems.
Default template title second font color.
Default template title background color.
This is template name used to render callout for dotted item.
This is template name used to render callouts for dotted items.
Items label text.
Defines label size.
Defines interval between items at the same level in diagram having items in normal state.
Defines interval between items at the same level in diagram having items in dot state.
Defines interval between items at the same level in diagram having items in line state.
Defines interval after level of items in diagram having items in normal state.
Defines interval after level of items in diagram having items in dot state.
Defines interval after level of items in diagram having items in line state.
Defines label orientation type.
Regular horizontal text.
Defines element placement relative to rectangular area.
Top side
This option controls selection check boxes visibility.
This option controls user buttons visibility.
Defines diagram item type.
Regular item.
Layout manager defined.
Defines item in diagram hierarchy.
This option controls callout visibility for dotted items.
Defines label orientation.
Defines label placement relative to its dot.

What is your?

JavaScript Widgets Library
 

What is your?

JavaScript MVC framework
 
Do you use graphics libraries?