pencil.js
Version:
Nice modular interactive 2D drawing library.
60 lines (59 loc) • 1.56 kB
TypeScript
/**
* Select class
* <br><img src="./media/examples/select.png" alt="select demo"/>
* @class
* @extends Input
*/
export default class Select extends Input {
/**
* @inheritDoc
* @param {Object} definition - Select definition
* @return {Select}
*/
static from(definition: any): Select;
/**
* Margin around the text
* @type {Number}
*/
static get MARGIN(): number;
/**
* Select constructor
* @param {PositionDefinition} positionDefinition - Any position
* @param {Array<String>} optionsList - List of options to display
* @param {InputOptions} [options] - Drawing options
*/
constructor(positionDefinition: any, optionsList: Array<string>, options?: any);
display: Text;
optionsList: Text[];
optionsContainer: Rectangle;
arrow: Triangle;
/**
* Computer button size
* @return {{width: Number, height: Number}}
*/
get size(): {
width: number;
height: number;
};
/**
* Get this button's width
* @return {Number}
*/
get width(): number;
/**
* Get this button's height
* @return {Number}
*/
get height(): number;
[selectedKey]: number;
}
export type SelectOptions = any;
import Input from "@pencil.js/input";
import Text from "@pencil.js/text";
import Rectangle from "@pencil.js/rectangle";
import Triangle from "@pencil.js/triangle";
/**
* @module Select
*/
declare const selectedKey: unique symbol;
export {};