geometrix 0.5.37 → 0.5.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -508,7 +508,7 @@ declare class DesignParam {
|
|
|
508
508
|
declare function designParam(iparamDef: tParamDef, suffix?: string): DesignParam;
|
|
509
509
|
declare function pNumber(name: string, unit: string, init: number, min?: number, max?: number, step?: number): tParam;
|
|
510
510
|
declare function pCheckbox(name: string, init: boolean): tParam;
|
|
511
|
-
declare function pDropdown(name: string, values: string[]): tParam;
|
|
511
|
+
declare function pDropdown(name: string, values: string[], iInit?: number): tParam;
|
|
512
512
|
declare function pSectionSeparator(name: string): tParam;
|
|
513
513
|
|
|
514
514
|
type tPosiOrien = [number, number, number];
|
package/dist/index.js
CHANGED
|
@@ -2923,11 +2923,15 @@ function pCheckbox(name, init) {
|
|
|
2923
2923
|
};
|
|
2924
2924
|
return rParam;
|
|
2925
2925
|
}
|
|
2926
|
-
function pDropdown(name, values) {
|
|
2926
|
+
function pDropdown(name, values, iInit = 0) {
|
|
2927
|
+
let init = 0;
|
|
2928
|
+
if (iInit < values.length) {
|
|
2929
|
+
init = iInit;
|
|
2930
|
+
}
|
|
2927
2931
|
const rParam = {
|
|
2928
2932
|
name,
|
|
2929
2933
|
unit: "dropdown",
|
|
2930
|
-
init
|
|
2934
|
+
init,
|
|
2931
2935
|
min: 0,
|
|
2932
2936
|
max: values.length - 1,
|
|
2933
2937
|
step: 1,
|