New value change listeners are available for certain controls:
Control | Listener |
---|---|
Dataview | CtrlUtils.onDataviewValueChanged |
Combobox | CtrlUtils.onComboboxValueChanged |
Slider | CtrlUtils.onSliderValueChanged |
Before version 3.0.0 there were multiple functions available for reacting on textbox value changes:
All of these functions have been removed.
Instead the new function CtrlUtils.onTextboxValueChanged has been created which combines the functionality of them all.
All occurences of onTextboxValueChange, onTextboxEnter and onTextboxEnter have to be replaced with onTextboxValueChanged.
Within the new textbox value changed function it can be configured on which event the callback should be triggered.
There are 3 trigger options.
Triggers on each new input, just like the original onTextboxValueChange function.
The trigger can be debounced by using the debounceMS
input, so that the callback only gets executed after there was no new input for a certain amount of time.
If no debouncing time is configured on the function input, the default debouncing time of the textbox control is used.
Triggers when pressing enter, similar to the original onTextboxEnter function.
If the Multiline property set for the textbox, the callback only gets executed if either the Alt, Ctrl or Shift key is pressed simultaniously.
Triggers when the textbox loses focus, just like the original onTextboxBlur function.
The triggers are represented by bits within the trigger enumeration and can therefore be combined by just adding the base triggers.
Combined triggers are also already available within the enumeration.
The default trigger is a combination of OnTyping and OnEnter, since this equals the behaviour of the Value Changed signal of the textbox control.
The UploadState enumeration was previously defined within the UploadUtils namespace, now it can be found in Cbn.CJS, just like all other typings that have been defined in the CustomJS Utils.
All occurences of UploadUtils.UploadState have to be replaced with Cbn.CJS.UploadState.
Previously a lot of private variables have been exposed in the typings of the Shapediver Embedded control.
Accessing these private variables is bad practice and therefore not supported via the CustomJS Utils anymore.
All occurences of _sdvInstance, _commPluginLoaded, _setParamValueQueue, _processSetParamValueQueue, _getViewerUri have to be replaced.
This is the representation of the old Shapediver API version 1.
In order to get rid of this variable the desired functionality has be to re-implemented using the new Shapediver API version 2.
This new API object can be fetched via getSDApi or getSDApiSync.
The function isCommPluginLoaded can be used instead of the private variable.
If _commPluginLoaded is used in a function for waiting on the communication plugin to be loaded you might also want to exchange the whole function with {@waitForCommPluginReady}.
All the other removed private variables are used very rarely in specific cases.
Their usage in these cases has to be reevaluated, there is no out-of-box solution for exchanging them.
Generated using TypeDoc