UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

1,172 lines (1,169 loc) 36.5 kB
import * as React from 'react'; import { Treemap } from "./Treemap"; import { toPoint, ensureEnum, brushToString, stringToBrush, ensureBool, initializePropertiesFromCss, NamePatcher, isValidProp, toSpinal, getModifiedProps, fromBrushCollection, toBrushCollection } from "igniteui-react-core"; import { FontInfo } from "igniteui-react-core"; import { ReactRenderer } from "igniteui-react-core"; import { delegateCombine, delegateRemove } from "igniteui-react-core"; import { DataChartStylingDefaults } from './DataChartStylingDefaults'; import { TreemapNodeStyleMapping } from './TreemapNodeStyleMapping'; import { IgrTreemapNodeStyleMappingCollection } from './igr-treemap-node-style-mapping-collection'; import { ContentChildrenManager } from "igniteui-react-core"; import { CollectionAdapter } from "igniteui-react-core"; import { NotifyCollectionChangedAction } from "igniteui-react-core"; import { TreemapFillScaleMode_$type } from "./TreemapFillScaleMode"; import { IgrTreemapNodeStylingEventArgs } from "./igr-treemap-node-styling-event-args"; import { TreemapOrientation_$type } from './TreemapOrientation'; import { TreemapLayoutType_$type } from './TreemapLayoutType'; import { IgrTreemapNodePointerEventArgs } from './igr-treemap-node-pointer-event-args'; import { TreemapHeaderDisplayMode_$type } from './TreemapHeaderDisplayMode'; import { HorizontalAlignment_$type } from "igniteui-react-core"; import { VerticalAlignment_$type } from "igniteui-react-core"; import { TreemapLabelHorizontalFitMode_$type } from './TreemapLabelHorizontalFitMode'; import { TreemapLabelVerticalFitMode_$type } from './TreemapLabelVerticalFitMode'; import { TreemapHighlightingMode_$type } from './TreemapHighlightingMode'; import { TreemapHighlightedValueDisplayMode_$type } from './TreemapHighlightedValueDisplayMode'; export class IgrTreemap extends React.Component { set height(value) { this._height = value; if (this._elRef) { this._elRef.style.height = value; this._treeMap.notifySizeChanged(); } } get height() { return this._height; } set width(value) { this._width = value; if (this._elRef) { this._elRef.style.height = value; this._treeMap.notifySizeChanged(); } } get width() { return this._width; } _getMainRef(ref) { this._elRef = ref; } _updateContentChildren() { this.contentStyleMappings.length = 0; let contentChildrenActual = this._contentChildrenManager.contentChildrenActual; for (let i = 0; i < contentChildrenActual.length; i++) { if ((TreemapNodeStyleMapping.$type).isAssignableFrom(contentChildrenActual[i].i.$type)) { this.contentStyleMappings.push(contentChildrenActual[i]); } } if (this._styleMappingsAdapter !== null) { this._styleMappingsAdapter.notifyContentChanged(); } } /** * A collection of manually added style mappings for the treemap. */ get styleMappings() { if (this._styleMappings === null) { let coll = new IgrTreemapNodeStyleMappingCollection(); let inner = coll._innerColl; inner.addListener((sender, e) => { switch (e.action) { case NotifyCollectionChangedAction.Add: this._styleMappingsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0)); break; case NotifyCollectionChangedAction.Remove: this._styleMappingsAdapter.removeManualItemAt(e.oldStartingIndex); break; case NotifyCollectionChangedAction.Replace: this._styleMappingsAdapter.removeManualItemAt(e.oldStartingIndex); this._styleMappingsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0)); break; case NotifyCollectionChangedAction.Reset: this._styleMappingsAdapter.clearManualItems(); break; } }); this._styleMappings = coll; } return this._styleMappings; } render() { let children = this._contentChildrenManager.getChildren(this.props.children); let div = React.createElement("div", { className: "ig-treemap igr-treemap", ref: this._getMainRef, children: children }); //} return div; } constructor(props) { super(props); this._wrapper = null; this.contentStyleMappings = []; /** * The style mappings actually present in the treemap. Do not directly modify this array. * This array's contents can be modified by causing React to reproject the child content. * Or adding and removing ranges from the manual ranges collection on the ranges property. */ this.actualStyleMappings = []; this._styleMappings = null; this._styleMappingsAdapter = null; this._implementation = null; this.__p = null; this._hasUserValues = new Set(); this._stylingContainer = null; this._stylingParent = null; this._inStyling = false; this._nodeStyling = null; this._nodeStyling_wrapped = null; this._nodeRenderStyling = null; this._nodeRenderStyling_wrapped = null; this._nodePointerOver = null; this._nodePointerOver_wrapped = null; this._nodePointerEnter = null; this._nodePointerEnter_wrapped = null; this._nodePointerLeave = null; this._nodePointerLeave_wrapped = null; this._nodePointerPressed = null; this._nodePointerPressed_wrapped = null; this._nodePointerReleased = null; this._nodePointerReleased_wrapped = null; if (this._styling) { NamePatcher.ensureStylablePatched(Object.getPrototypeOf(this)); } this._getMainRef = this._getMainRef.bind(this); this._contentChildrenManager = new ContentChildrenManager((ch) => ch.key || ch.props.name, (ch) => ch.key || ch.props.name, () => this._updateContentChildren()); this._implementation = this.createImplementation(); if (document) { this._container = document.createElement("div"); this._container.style.display = "block"; this._container.style.width = "100%"; this._container.style.height = "100%"; } var root; root = this._container; if (this._container != null) { root = this._container; } var ren = new ReactRenderer(root, document, true, DataChartStylingDefaults); this._wrapper = ren; var treemap = this.i; this._treeMap = treemap; this._styleMappingsAdapter = new CollectionAdapter(this.contentStyleMappings, this.i.styleMappings, this.actualStyleMappings, (c) => c.i, (i) => { if (this._container && this._container.parentElement) { i._styling(this._container, this, this); } }, (i) => { }); treemap.provideContainer(ren); treemap.notifySizeChanged(); if (props) { this.initializeProperties(); } ren.addSizeWatcher(() => { this._treeMap.notifySizeChanged(); }); } shouldComponentUpdate(nextProps, nextState) { const mod = getModifiedProps(this.props, nextProps); for (const p of Object.keys(mod)) { if (isValidProp(this, p)) { this[p] = mod[p]; } } return true; } initializeProperties() { for (const p of Object.keys(this.props)) { if (isValidProp(this, p)) { this[p] = this.props[p]; } } } // supports angular themes or custom properties set in CSS updateStyle() { this._styling(this._elRef, this); } destroy() { this._treeMap.destroy(); this._wrapper.destroy(); } componentWillUnmount() { } componentDidMount() { this._elRef.style.width = this._width ? this._width : ""; this._elRef.style.height = this._height ? this._height : ""; this._elRef.appendChild(this._container); this._treeMap.notifySizeChanged(); this.initializeContent(); } initializeContent() { this._styling(this._container, this); if (this.actualStyleMappings && this.actualStyleMappings.length > 0) { var currStyleMapping = this.actualStyleMappings; for (var i = 0; i < currStyleMapping.length; i++) { currStyleMapping[i]._styling(this._container, this, this); } } this._updateContentChildren(); this.updateStyle(); this.i.notifySizeChanged(); } createImplementation() { return new Treemap(); } get i() { return this._implementation; } /** * Gets or sets path to use to get the values from the items. */ get valueMemberPath() { return this.i.hx; } set valueMemberPath(v) { this.i.hx = v; } /** * Gets or sets the root title to use for breadcrumbs. */ get rootTitle() { return this.i.hn; } set rootTitle(v) { this.i.hn = v; } /** * Gets or sets the root title to use for breadcrumbs. */ get breadcrumbSequence() { return this.i.fh; } set breadcrumbSequence(v) { this.i.fh = v; } /** * Gets or sets the path to use to get the Parent of the items. */ get parentIdMemberPath() { return this.i.hb; } set parentIdMemberPath(v) { this.i.hb = v; } /** * Gets or sets the path to use to get the Label of the items. */ get labelMemberPath() { return this.i.gt; } set labelMemberPath(v) { this.i.gt = v; } /** * Gets or sets the path to use to get the custom value of the items. */ get customValueMemberPath() { return this.i.fk; } set customValueMemberPath(v) { this.i.fk = v; } /** * Gets or sets the path to use to get the id of the items. */ get idMemberPath() { return this.i.gj; } set idMemberPath(v) { this.i.gj = v; } /** * Gets or sets the (possibly hierarchical) data to assign to the TreeMap. */ get dataSource() { return this.i.dataSource; } set dataSource(v) { this.i.dataSource = v; } /** * Gets or sets the data to highlight. */ get highlightedDataSource() { return this.i.highlightedDataSource; } set highlightedDataSource(v) { this.i.highlightedDataSource = v; } /** * Gets or sets the highlighted value mapping property. */ get highlightedValueMemberPath() { return this.i.gb; } set highlightedValueMemberPath(v) { this.i.gb = v; } /** * Gets or sets the opacity applied to the node underneath the highlighted value. */ get highlightedValueOpacity() { return this.i.dt; } set highlightedValueOpacity(v) { this.i.dt = +v; } /** * Gets or sets the display mode for highlighted values. */ get highlightedValuesDisplayMode() { return this.i.l; } set highlightedValuesDisplayMode(v) { this.i.l = ensureEnum(TreemapHighlightedValueDisplayMode_$type, v); } /** * Gets or sets brushes to use for the fill scale. */ get fillBrushes() { return fromBrushCollection(this.i.b); } set fillBrushes(v) { this.i.b = toBrushCollection(v); } /** * Gets or sets mode to use for the fill scale. */ get fillScaleMode() { return this.i.d; } set fillScaleMode(v) { this.i.d = ensureEnum(TreemapFillScaleMode_$type, v); } /** * Gets or sets whether the fill scale is logarithmic. */ get isFillScaleLogarithmic() { return this.i.bx; } set isFillScaleLogarithmic(v) { this.i.bx = ensureBool(v); } /** * Gets or sets the logarithm base to use if the fill scale is logarithmic. */ get fillScaleLogarithmBase() { return this.i.ez; } set fillScaleLogarithmBase(v) { this.i.ez = +v; } /** * Gets or sets the minimum value to use for the fill scale. */ get fillScaleMinimumValue() { return this.i.dl; } set fillScaleMinimumValue(v) { this.i.dl = +v; } /** * Gets or sets the maximum value to use for the fill scale. */ get fillScaleMaximumValue() { return this.i.dk; } set fillScaleMaximumValue(v) { this.i.dk = +v; } /** * Gets or sets the vertical fit mode to use for the node labels. */ get labelVerticalFitMode() { return this.i.r; } set labelVerticalFitMode(v) { this.i.r = ensureEnum(TreemapLabelVerticalFitMode_$type, v); } /** * Gets or sets the horizontal fit mode to use for the node labels. */ get labelHorizontalFitMode() { return this.i.o; } set labelHorizontalFitMode(v) { this.i.o = ensureEnum(TreemapLabelHorizontalFitMode_$type, v); } /** * Gets or sets the background to use for the overlay header when it is hovered. */ get overlayHeaderHoverBackground() { return brushToString(this.i.jx); } set overlayHeaderHoverBackground(v) { this.i.jx = stringToBrush(v); } /** * Gets or sets the background to use for the header when it is hovered. */ get headerHoverBackground() { return brushToString(this.i.jr); } set headerHoverBackground(v) { this.i.jr = stringToBrush(v); } /** * Gets or sets the background to use for the header. */ get headerBackground() { return brushToString(this.i.jp); } set headerBackground(v) { this.i.jp = stringToBrush(v); } /** * Gets or sets the background to use for the overlay header. */ get overlayHeaderBackground() { return brushToString(this.i.jw); } set overlayHeaderBackground(v) { this.i.jw = stringToBrush(v); } /** * Gets or sets the text color to use for the header. */ get headerTextColor() { return brushToString(this.i.ju); } set headerTextColor(v) { this.i.ju = stringToBrush(v); } /** * Gets or sets the dark text color to use for the header. */ get headerDarkTextColor() { return brushToString(this.i.jq); } set headerDarkTextColor(v) { this.i.jq = stringToBrush(v); } /** * Gets or sets the text color to use for the nodes. */ get textColor() { return brushToString(this.i.j7); } set textColor(v) { this.i.j7 = stringToBrush(v); } /** * Gets or sets the dark text color to use for the nodes. */ get darkTextColor() { return brushToString(this.i.jo); } set darkTextColor(v) { this.i.jo = stringToBrush(v); } /** * Gets or sets the text color to use for the header. */ get headerHoverTextColor() { return brushToString(this.i.jt); } set headerHoverTextColor(v) { this.i.jt = stringToBrush(v); } /** * Gets or sets the dark text color to use for the header when hovered. */ get headerHoverDarkTextColor() { return brushToString(this.i.js); } set headerHoverDarkTextColor(v) { this.i.js = stringToBrush(v); } /** * Gets or sets the font to use for content nodes */ get textStyle() { if (this.i.a8 == null) { return null; } return this.i.a8.fontString; } set textStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.a8 = fi; } /** * Gets or sets the font to use for header nodes */ get headerTextStyle() { if (this.i.a6 == null) { return null; } return this.i.a6.fontString; } set headerTextStyle(v) { let fi = new FontInfo(); fi.fontString = v; this.i.a6 = fi; } /** * Gets or sets the font to use for header nodes */ get headerDisplayMode() { return this.i.j; } set headerDisplayMode(v) { this.i.j = ensureEnum(TreemapHeaderDisplayMode_$type, v); } /** * Gets or sets the left margin to use for the header. */ get headerLabelLeftMargin() { return this.i.dq; } set headerLabelLeftMargin(v) { this.i.dq = +v; } /** * Gets or sets the top margin to use for the header. */ get headerLabelTopMargin() { return this.i.ds; } set headerLabelTopMargin(v) { this.i.ds = +v; } /** * Gets or sets the right margin to use for the header. */ get headerLabelRightMargin() { return this.i.dr; } set headerLabelRightMargin(v) { this.i.dr = +v; } /** * Gets or sets the bottom margin to use for the header. */ get headerLabelBottomMargin() { return this.i.dp; } set headerLabelBottomMargin(v) { this.i.dp = +v; } /** * Gets or sets the left margin to use for the overlay header. */ get overlayHeaderLabelLeftMargin() { return this.i.d3; } set overlayHeaderLabelLeftMargin(v) { this.i.d3 = +v; } /** * Gets or sets the top margin to use for the overlay header. */ get overlayHeaderLabelTopMargin() { return this.i.d5; } set overlayHeaderLabelTopMargin(v) { this.i.d5 = +v; } /** * Gets or sets the right margin to use for the overlay header. */ get overlayHeaderLabelRightMargin() { return this.i.d4; } set overlayHeaderLabelRightMargin(v) { this.i.d4 = +v; } /** * Gets or sets the bottom margin to use for the overlay header. */ get overlayHeaderLabelBottomMargin() { return this.i.d2; } set overlayHeaderLabelBottomMargin(v) { this.i.d2 = +v; } /** * Gets or sets the left margin to use for the labels. */ get labelLeftMargin() { return this.i.dx; } set labelLeftMargin(v) { this.i.dx = +v; } /** * Gets or sets the top margin to use for the labels. */ get labelTopMargin() { return this.i.dz; } set labelTopMargin(v) { this.i.dz = +v; } /** * Gets or sets the right margin to use for the labels. */ get labelRightMargin() { return this.i.dy; } set labelRightMargin(v) { this.i.dy = +v; } /** * Gets or sets the bottom margin to use for the labels. */ get labelBottomMargin() { return this.i.dw; } set labelBottomMargin(v) { this.i.dw = +v; } /** * Gets or sets the left margin to use for the parent nodes. */ get parentNodeLeftMargin() { return this.i.d8; } set parentNodeLeftMargin(v) { this.i.d8 = +v; } /** * Gets or sets the top margin to use for the parent nodes. */ get parentNodeTopMargin() { return this.i.ec; } set parentNodeTopMargin(v) { this.i.ec = +v; } /** * Gets or sets the right margin to use for the parent nodes. */ get parentNodeRightMargin() { return this.i.ea; } set parentNodeRightMargin(v) { this.i.ea = +v; } /** * Gets or sets the bottom margin to use for the parent nodes. */ get parentNodeBottomMargin() { return this.i.d6; } set parentNodeBottomMargin(v) { this.i.d6 = +v; } /** * Gets or sets the left padding to use for the parent nodes. */ get parentNodeLeftPadding() { return this.i.d9; } set parentNodeLeftPadding(v) { this.i.d9 = +v; } /** * Gets or sets the top padding to use for the parent nodes. */ get parentNodeTopPadding() { return this.i.ed; } set parentNodeTopPadding(v) { this.i.ed = +v; } /** * Gets or sets the right padding to use for the parent nodes. */ get parentNodeRightPadding() { return this.i.eb; } set parentNodeRightPadding(v) { this.i.eb = +v; } /** * Gets or sets the bottom padding to use for the parent nodes. */ get parentNodeBottomPadding() { return this.i.d7; } set parentNodeBottomPadding(v) { this.i.d7 = +v; } /** * Gets or sets the horizontal alignment to use for the node labels. */ get labelHorizontalAlignment() { return this.i.ja; } set labelHorizontalAlignment(v) { this.i.ja = ensureEnum(HorizontalAlignment_$type, v); } /** * Gets or sets the vertical alignment to use for the node labels. */ get labelVerticalAlignment() { return this.i.kd; } set labelVerticalAlignment(v) { this.i.kd = ensureEnum(VerticalAlignment_$type, v); } /** * Gets or sets the height to use for the header. */ get headerHeight() { return this.i.dn; } set headerHeight(v) { this.i.dn = +v; } /** * Gets or sets the outline to use for the nodes. */ get outline() { return brushToString(this.i.jv); } set outline(v) { this.i.jv = stringToBrush(v); } /** * Gets or sets the stroke thickness to use for the node outline. */ get strokeThickness() { return this.i.es; } set strokeThickness(v) { this.i.es = +v; } /** * Gets or sets the opacity to use for the nodes. */ get nodeOpacity() { return this.i.d1; } set nodeOpacity(v) { this.i.d1 = +v; } /** * Gets or sets the orientation to use for the stripped and slice and dice layout types. */ get layoutOrientation() { return this.i.al; } set layoutOrientation(v) { this.i.al = ensureEnum(TreemapOrientation_$type, v); } /** * Gets or sets the type of layout to use for the nodes. */ get layoutType() { return this.i.u; } set layoutType(v) { this.i.u = ensureEnum(TreemapLayoutType_$type, v); } /** * Gets or sets the minimum size (width or height) to display a node. */ get minimumDisplaySize() { return this.i.d0; } set minimumDisplaySize(v) { this.i.d0 = +v; } /** * Gets or sets the number of milliseconds over which changes to the gauge should be animated. */ get transitionDuration() { return this.i.e3; } set transitionDuration(v) { this.i.e3 = +v; } /** * Gets or sets the scaling value used to affect the pixel density of the control. * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control * to appear blurry. */ get pixelScalingRatio() { return this.i.ee; } set pixelScalingRatio(v) { this.i.ee = +v; } get actualPixelScalingRatio() { return this.i.dg; } set actualPixelScalingRatio(v) { this.i.dg = +v; } /** * Gets or sets the scaling value used to affect the pixel density of the control while it is animating. * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control * to appear blurry. */ get interactionPixelScalingRatio() { return this.i.dv; } set interactionPixelScalingRatio(v) { this.i.dv = +v; } /** * Gets or sets the resolved scaling value used to affect the pixel density of the control while it is animating. * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control * to appear blurry. */ get actualInteractionPixelScalingRatio() { return this.i.df; } set actualInteractionPixelScalingRatio(v) { this.i.df = +v; } /** * Gets or sets the number of milliseconds over which the highlighting effect will render. */ get highlightingTransitionDuration() { return this.i.e1; } set highlightingTransitionDuration(v) { this.i.e1 = +v; } /** * Gets or sets the highlighting mode to use. */ get highlightingMode() { return this.i.aw; } set highlightingMode(v) { this.i.aw = ensureEnum(TreemapHighlightingMode_$type, v); } /** * Gets the actual highlighting mode used. */ get actualHighlightingMode() { return this.i.au; } set actualHighlightingMode(v) { this.i.au = ensureEnum(TreemapHighlightingMode_$type, v); } /** * Gets or sets the opacity to use for nodes that are not highlighted when HighlightingMode is set to FadeOthers. */ get highlightingFadeOpacity() { return this.i.du; } set highlightingFadeOpacity(v) { this.i.du = +v; } get animating() { return this.i.bs; } /** * Gets or sets the item to drill to in the treemap. */ get focusItem() { return this.i.e5; } set focusItem(v) { this.i.e5 = v; } findByName(name) { if (this.findEphemera) { if (name && name.indexOf("@@e:") == 0) { return this.findEphemera(name); } } if (this.styleMappings != null && this.styleMappings.findByName && this.styleMappings.findByName(name)) { return this.styleMappings.findByName(name); } return null; } get hasUserValues() { return this._hasUserValues; } __m(propertyName) { if (!this._inStyling) { this._hasUserValues.add(propertyName); } } _styling(container, component, parent) { if (this._inStyling) { return; } this._inStyling = true; this._stylingContainer = container; this._stylingParent = component; let genericPrefix = ""; let typeName = this.i.$type.name; if (typeName.indexOf("Xam") === 0) { typeName = typeName.substring(3); } genericPrefix = toSpinal("Treemap"); let additionalPrefixes = []; let prefix = toSpinal(typeName); additionalPrefixes.push(prefix + "-"); let b = this.i.$type.baseType; while (b && b.name != "Object" && b.name != "Base" && b.name != "Control" && b.Name != "DependencyObject" && b.Name != "FrameworkElement") { typeName = b.name; if (typeName.indexOf("Xam") === 0) { typeName = typeName.substring(3); } let basePrefix = toSpinal(typeName); additionalPrefixes.push(basePrefix + "-"); b = b.baseType; } if (parent) { let parentTypeName = parent.i.$type.name; if (parentTypeName.indexOf("Xam") === 0) { parentTypeName = parentTypeName.substring(3); } let parentPrefix = toSpinal(parentTypeName); additionalPrefixes.push(parentPrefix + "-" + genericPrefix + "-"); additionalPrefixes.push(parentPrefix + "-" + prefix + "-"); } initializePropertiesFromCss(container, this, genericPrefix + "-", this.hasUserValues, false, additionalPrefixes); if (this._otherStyling) { this._otherStyling(container, component, parent); } this._inStyling = false; } notifySizeChanged() { this.i.notifySizeChanged(); } /** * Returns visuals as a serialized string. */ exportSerializedVisualData() { let iv = this.i.fn(); return (iv); } markDirty() { this.i.ic(); } onDetachedFromUI() { this.i.onDetachedFromUI(); } onAttachedToUI() { this.i.onAttachedToUI(); } flush() { this.i.h9(); } notifySetItem(source_, index, oldItem, newItem) { this.i.ii(source_, index, oldItem, newItem); } /** * Manually notifies the treemap's data source that the data it has bound to has been cleared and needs to be re-examined. * This should not be called if the data that the pie chart is bound to is already observable. * @param source_ * The data source. */ notifyClearItems(source_) { this.i.ie(source_); } notifyInsertItem(source_, index, newItem) { this.i.ig(source_, index, newItem); } notifyRemoveItem(source_, index, oldItem) { this.i.ih(source_, index, oldItem); } simulateHover(point) { this.i.i2(toPoint(point)); } /** * Fired when a node is being styled. Provides an opportunity to customize node styling. */ get nodeStyling() { return this._nodeStyling; } set nodeStyling(ev) { if (this._nodeStyling_wrapped !== null) { this.i.nodeStyling = delegateRemove(this.i.nodeStyling, this._nodeStyling_wrapped); this._nodeStyling_wrapped = null; this._nodeStyling = null; } this._nodeStyling = ev; this._nodeStyling_wrapped = (o, e) => { let outerArgs = new IgrTreemapNodeStylingEventArgs(); outerArgs._provideImplementation(e); if (this.beforeNodeStyling) { this.beforeNodeStyling(this, outerArgs); } if (this._nodeStyling) { this._nodeStyling(this, outerArgs); } }; this.i.nodeStyling = delegateCombine(this.i.nodeStyling, this._nodeStyling_wrapped); ; } /** * Fired before a node is rendered for last minute style changes. */ get nodeRenderStyling() { return this._nodeRenderStyling; } set nodeRenderStyling(ev) { if (this._nodeRenderStyling_wrapped !== null) { this.i.nodeRenderStyling = delegateRemove(this.i.nodeRenderStyling, this._nodeRenderStyling_wrapped); this._nodeRenderStyling_wrapped = null; this._nodeRenderStyling = null; } this._nodeRenderStyling = ev; this._nodeRenderStyling_wrapped = (o, e) => { let outerArgs = new IgrTreemapNodeStylingEventArgs(); outerArgs._provideImplementation(e); if (this.beforeNodeRenderStyling) { this.beforeNodeRenderStyling(this, outerArgs); } if (this._nodeRenderStyling) { this._nodeRenderStyling(this, outerArgs); } }; this.i.nodeRenderStyling = delegateCombine(this.i.nodeRenderStyling, this._nodeRenderStyling_wrapped); ; } /** * Fired with the pointer is moving over a node. */ get nodePointerOver() { return this._nodePointerOver; } set nodePointerOver(ev) { if (this._nodePointerOver_wrapped !== null) { this.i.nodePointerOver = delegateRemove(this.i.nodePointerOver, this._nodePointerOver_wrapped); this._nodePointerOver_wrapped = null; this._nodePointerOver = null; } this._nodePointerOver = ev; this._nodePointerOver_wrapped = (o, e) => { let outerArgs = new IgrTreemapNodePointerEventArgs(); outerArgs._provideImplementation(e); if (this.beforeNodePointerOver) { this.beforeNodePointerOver(this, outerArgs); } if (this._nodePointerOver) { this._nodePointerOver(this, outerArgs); } }; this.i.nodePointerOver = delegateCombine(this.i.nodePointerOver, this._nodePointerOver_wrapped); ; } /** * Fired when the pointer enters a node. */ get nodePointerEnter() { return this._nodePointerEnter; } set nodePointerEnter(ev) { if (this._nodePointerEnter_wrapped !== null) { this.i.nodePointerEnter = delegateRemove(this.i.nodePointerEnter, this._nodePointerEnter_wrapped); this._nodePointerEnter_wrapped = null; this._nodePointerEnter = null; } this._nodePointerEnter = ev; this._nodePointerEnter_wrapped = (o, e) => { let outerArgs = new IgrTreemapNodePointerEventArgs(); outerArgs._provideImplementation(e); if (this.beforeNodePointerEnter) { this.beforeNodePointerEnter(this, outerArgs); } if (this._nodePointerEnter) { this._nodePointerEnter(this, outerArgs); } }; this.i.nodePointerEnter = delegateCombine(this.i.nodePointerEnter, this._nodePointerEnter_wrapped); ; } /** * Fired when the pointer leaved a node. */ get nodePointerLeave() { return this._nodePointerLeave; } set nodePointerLeave(ev) { if (this._nodePointerLeave_wrapped !== null) { this.i.nodePointerLeave = delegateRemove(this.i.nodePointerLeave, this._nodePointerLeave_wrapped); this._nodePointerLeave_wrapped = null; this._nodePointerLeave = null; } this._nodePointerLeave = ev; this._nodePointerLeave_wrapped = (o, e) => { let outerArgs = new IgrTreemapNodePointerEventArgs(); outerArgs._provideImplementation(e); if (this.beforeNodePointerLeave) { this.beforeNodePointerLeave(this, outerArgs); } if (this._nodePointerLeave) { this._nodePointerLeave(this, outerArgs); } }; this.i.nodePointerLeave = delegateCombine(this.i.nodePointerLeave, this._nodePointerLeave_wrapped); ; } /** * Fired when the pointer is pressed on a node. */ get nodePointerPressed() { return this._nodePointerPressed; } set nodePointerPressed(ev) { if (this._nodePointerPressed_wrapped !== null) { this.i.nodePointerPressed = delegateRemove(this.i.nodePointerPressed, this._nodePointerPressed_wrapped); this._nodePointerPressed_wrapped = null; this._nodePointerPressed = null; } this._nodePointerPressed = ev; this._nodePointerPressed_wrapped = (o, e) => { let outerArgs = new IgrTreemapNodePointerEventArgs(); outerArgs._provideImplementation(e); if (this.beforeNodePointerPressed) { this.beforeNodePointerPressed(this, outerArgs); } if (this._nodePointerPressed) { this._nodePointerPressed(this, outerArgs); } }; this.i.nodePointerPressed = delegateCombine(this.i.nodePointerPressed, this._nodePointerPressed_wrapped); ; } /** * Fired when the pointer is released on a node. */ get nodePointerReleased() { return this._nodePointerReleased; } set nodePointerReleased(ev) { if (this._nodePointerReleased_wrapped !== null) { this.i.nodePointerReleased = delegateRemove(this.i.nodePointerReleased, this._nodePointerReleased_wrapped); this._nodePointerReleased_wrapped = null; this._nodePointerReleased = null; } this._nodePointerReleased = ev; this._nodePointerReleased_wrapped = (o, e) => { let outerArgs = new IgrTreemapNodePointerEventArgs(); outerArgs._provideImplementation(e); if (this.beforeNodePointerReleased) { this.beforeNodePointerReleased(this, outerArgs); } if (this._nodePointerReleased) { this._nodePointerReleased(this, outerArgs); } }; this.i.nodePointerReleased = delegateCombine(this.i.nodePointerReleased, this._nodePointerReleased_wrapped); ; } }