Skip to main content

%ZEN.SVGComponent.abstractSVGGroup

Class %ZEN.SVGComponent.abstractSVGGroup Extends %XML.Adaptor [ Abstract, Deprecated, PropertyClass = %ZEN.componentParameters, System = 3 ]

Base implementation of SVG group behavior.

Parameters

NAMESPACE

Parameter NAMESPACE = "http://www.intersystems.com/zen";

XML namespace used for library components.

DEFAULTLAYOUT

Parameter DEFAULTLAYOUT As STRING;

Subclasses can set this to change default layout for a group.

Properties

children

Property children As list Of svgComponent(XMLELEMENTREF = 1, XMLPROJECTION = "ELEMENT", XMLTYPECONSTRAINT = "CHOICE", ZENSETTING = 0);

Set of svg components within this group.

layout

Property layout As %ZEN.Datatype.string(VALUELIST = ",vertical,horizontal,flow,none") [ InitialExpression = {..#DEFAULTLAYOUT} ];

Specifies how components within this group should be layed out.
"none" indicates that no layout is provided.
"vertical" indicates that components within this group are layed out vertically.
"horizontal" indicates that components within this group are layed out horizontally.
"flow" indicates that components within this group are placed within multiple rows. Items are placed horizontally until the width of the container is exceeded and then components are placed on the next row.

disabled

Property disabled As %ZEN.Datatype.boolean [ InitialExpression = 0 ];

If true, this group and its children are disabled.

%partial

Property %partial As %ZEN.Datatype.boolean(XMLPROJECTION = "none") [ InitialExpression = 0, Internal ];

Internal property.
If true, this group was only partially serialized on the client (it is the ancestor of the object being serialized) and we should ignore changes made to the children array when shipping changes back to the client.

Methods

renderSVG

ClientMethod renderSVG(document, parent) [ Final, Language = javascript ]

Draw an enclosing SVG group and then render the SVG children of the group.

layoutChildren

ClientMethod layoutChildren() [ Language = javascript ]

Apply layout to the child components within this group. Updates the value of width and height for this group;

setOverlayMode

ClientMethod setOverlayMode(mode) [ Language = javascript ]

Set overlay mode for each child of this group.

%AddChild

Method %AddChild(pComponent As %ZEN.Component.object)

Add a child component pComponent to this group. This is called when the server component tree is being created. This also adds pComponent to the page that this group belongs to; this group must be added to a page before adding any child components to it. In addition, the id property of the component must be set before calling this method.

%RemoveChild

Method %RemoveChild(pComponent As %ZEN.Component.object) As %Boolean

Remove child component pComponent from this group. Returns true if the component was found and removed.

addChild

ClientMethod addChild(component) [ Language = javascript ]

Client-side method.
Dynamically add a component to this group on the client.

removeChild

ClientMethod removeChild(component) [ Language = javascript ]

Client-side method.
Dynamically remove a component from this group on the client.

setPropertyAll

ClientMethod setPropertyAll(property, value, value2) [ Language = javascript ]

Apply the given value to the specified property for this group and all of its children.
Note that this will not work for 'disabled'; for that use setProperty.