File

src/api/model/channel/techTableProperties.ts

Extends

Base

Index

Properties
Methods

Constructor

constructor(techTablesServices: TechTableServices)
Parameters :
Name Type Optional
techTablesServices TechTableServices No

Properties

Public activeMaterial
Type : Variable
Default value : <Variable>{}
Decorators :
@Listenable()

t. The active tool

Methods

createListener
createListener(props: Array)

This method will return a custom listener object designed for listening to changes on some concrete properties. Pooling can be avoived, so it can represent a significant better performance.

const listener1 = cnc.getChannel(1).activeToolProperties.createListener(['t', 'd']);
listener1.start((activeToolPoroperties, props) => {
console.log(`"t" or "d" (or both) have changed: ${props.join(',')} (within the last 500 ms)`)})
}, { debounceTime: 500 });
Parameters :
Name Type Optional Description
props Array<string> No

Array containing string with current objects propeties (@Listenables) names

Returns : Listener
deleteListener
deleteListener(props: Array)

This method will remove the props listenar from current active tool properties entity. The properties listener has certain cost and must be un-plugged when is no longer needed.

// Considering previous example
const listener1 = cnc.getChannel(1).activeToolProperties.createListener(['t', 'd']);
listener1.start((activeToolProperties, props) => {
console.log(`"t" or "d" (or both) have changed: ${props.join(',')} (within the last 500 ms)`)})
}, { debounceTime: 500 });


cnc.getChannel(1).activeToolProperties.deleteListener(listener1);
// After calling deleteListener "listener1"  will be null, ready for garbage collector.
Parameters :
Name Type Optional Description
props Array<string> No

Array containing string with current objects propeties (@Listenable()) names

Returns : void

results matching ""

    No results matching ""