API / geotoolkit / welllog / LogCurveSelectedItem / LogCurveSelectedItem
welllog.LogCurveSelectedItem.LogCurveSelectedItem
Base class for selected item, that could be returned via Selector
Throws
Error if sender is not set
| Name | Type |
|---|---|
T | extends LogCurve |
↳
LogCurveSelectedItem
Constructors
• new LogCurveSelectedItem<T>(sender, data?, selectionType?)
Create selected item
| Name | Type |
|---|---|
T | extends LogCurve<T> |
| Name | Type | Description |
|---|---|---|
sender | T | node that create the item |
Optional data | ReturnType<T["hitTest"]> | some data |
Optional selectionType | SelectionType |
SelectedItem.constructor
Methods
▸ getClassName(): string
string
▸ getData<U>(A?): ReturnType<U["hitTest"]>
Gets data
Example
import {isSelectedItem} from '@int/geotoolkit/selection/SelectedItem';
const items = Selector.select(root, devicePoint, 3).filter(isSelectedItem);
items.forEach((item) => {
const data = item.getData(LogSinusoid);
if (data) { // it means this SelectedItem came from LogSinusoid
// now inside 'if' typescript knows type of data
data[0].getDepth();
}
});| Name | Type |
|---|---|
U | extends any = any |
| Name | Type | Description |
|---|---|---|
Optional A | Constructable<U> | if provided vetify that this SelectedItem came from provided type |
ReturnType<U["hitTest"]>
▸ getSelectionType(): SelectionType
Returns selection type, is it a Line, Symbol or Text
selection type
▸ getSender(): any
Gets sender
any
▸ setSelectionType(selectionType): LogCurveSelectedItem<T>
Set selection type
| Name | Type | Description |
|---|---|---|
selectionType | SelectionType | selection type |
this
▸ Static getClassName(): string
string