Skip to content

Latest commit

 

History

History
160 lines (139 loc) · 6.43 KB

VisualBase.adoc

File metadata and controls

160 lines (139 loc) · 6.43 KB

/** * Type definition for mouse event. * @typedef {Object} anychart.core.MouseEvent * @property {anychart.graphics.events.EventType} type Event type * @property {(anychart.core.VisualBase|anychart.graphics.vector.Element|anychart.graphics.vector.Stage|Node|undefined)} target Target * @property {(anychart.core.VisualBase|anychart.graphics.vector.Element|anychart.graphics.vector.Stage|Node|undefined)} currentTarget Current target * @property {(anychart.core.VisualBase|anychart.graphics.vector.Element|anychart.graphics.vector.Stage|Node|undefined)} relatedTarget Related target * @property {(anychart.graphics.vector.Element|anychart.graphics.vector.Stage|Node|undefined)} domTarget DOM target * @property {(anychart.graphics.vector.Element|anychart.graphics.vector.Stage|Node|undefined)} relatedDomTarget Related dom target * @property {number} offsetX Offset by X * @property {number} offsetY Offset by Y * @property {number} clientX Client X * @property {number} clientY Client Y * @property {number} screenX Screen X * @property {number} screenY Screen Y * @property {number} button Button * @property {number} keyCode Key code * @property {number} charCode Char code * @property {boolean} ctrlKey CTRL key * @property {boolean} altKey ALT key * @property {boolean} shiftKey Shift key * @property {boolean} metaKey Meta key * @property {boolean} platformModifierKey Platform modifier key */ anychart.core.MouseEvent;

/** * Base class for all elements. * @constructor * @extends {anychart.core.Base} */ anychart.core.VisualBase;

/** * Getter for the Z-index of the element. * @shortDescription Z-index of the element. * @category Size and Position * @example anychart.core.VisualBase.zIndex_get * @return {number} Z-index. */ anychart.core.VisualBase.prototype.zIndex;

/** * Setter for the Z-index of the element. * @detailed The bigger the index - the higher the element position is. * @example anychart.core.VisualBase.zIndex_set * @param {number=} opt_zIndex [0] Value to set. * @return {anychart.core.VisualBase} Self instance for method chaining. */ anychart.core.VisualBase.prototype.zIndex;

/** * Getter for the element state (enabled or disabled). * @shortDescription Element state (enabled or disabled). * @category Interactivity * @example anychart.core.VisualBase.enabled_get * @return {boolean} Element state. */ anychart.core.VisualBase.prototype.enabled;

/** * Setter for the element enabled state. * @listing Example. * if (!element.enabled()) * element.enabled(true); * @example anychart.core.VisualBase.enabled_set * @param {boolean=} opt_enabled [true] Enabled state to set. * @return {anychart.core.VisualBase} Self instance for method chaining. */ anychart.core.VisualBase.prototype.enabled;

/** * Prints all elements on related stage. * @shortDescription Prints all elements. * @category Export * @example anychart.core.VisualBase.print * @param {(anychart.graphics.vector.PaperSize|Object)=} opt_paperSizeOrOptions Paper size or object with options. * @param {boolean=} opt_landscape [false] Flag of landscape. */ anychart.core.VisualBase.prototype.print;

/** * Getter for the container. * @shortDescription Container for the elements. * @return {anychart.graphics.vector.Layer|anychart.graphics.vector.Stage} An instance of the class for method chaining. */ anychart.core.VisualBase.prototype.container;

/** * Setter for the container. * @param {(anychart.graphics.vector.Layer|anychart.graphics.vector.Stage|string|Element)=} opt_element The value to set. * @return {anychart.core.VisualBase} Self instance for method chaining. */ anychart.core.VisualBase.prototype.container;

/** * Getter for the parent bounds.<br> * Bounds that would be used in case of percent size calculations. Expects pixel values only. * @return {anychart.math.Rect} The parent bounds of the element. */ anychart.core.VisualBase.prototype.parentBounds;

/** * Setter for the parent bounds using single value.<br> * Bounds that would be used in case of percent size calculations. Expects pixel values only. * @param {(anychart.math.Rect|{left:number,top:number,width:number,height:number}|number|null)=} opt_bounds Bounds to set. * @return {anychart.core.VisualBase} Self instance for method chaining. */ anychart.core.VisualBase.prototype.parentBounds;

/** * Setter for the parent bounds using several values.<br> * Bounds that would be used in case of percent size calculations. Expects pixel values only. * @param {number=} opt_left Left space. * @param {number=} opt_top Top space. * @param {number=} opt_width Element width. * @param {number=} opt_height Element height. * @return {anychart.core.VisualBase} Self instance for method chaining. */ anychart.core.VisualBase.prototype.parentBounds;