@shapediver/viewer.settings
Advanced tools
Comparing version 0.1.14 to 0.1.17
@@ -16,3 +16,3 @@ import { IGlobalSettings } from "./interfaces/IGlobalSettings"; | ||
export declare const validate: (settings: any, targetVersion?: versions | undefined) => void; | ||
export declare const evaluateSettingsVersion: (viewerVersion: string) => versions; | ||
export declare const evaluateSettingsVersion: (viewerVersion?: string | undefined) => versions; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -76,11 +76,18 @@ "use strict"; | ||
const evaluateSettingsVersion = (viewerVersion) => { | ||
if (viewerVersion.startsWith('0') || viewerVersion === '1.0.0' || viewerVersion === '1.0.1' || viewerVersion === '1.0.2' || viewerVersion === '1.0.3' || viewerVersion === '1.0.4' || viewerVersion === '1.0.5') | ||
return '2.0'; | ||
if (viewerVersion.startsWith('1')) | ||
if (!viewerVersion || viewerVersion.startsWith('1')) | ||
return '1.0'; | ||
if (viewerVersion.startsWith('2')) | ||
return '2.0'; | ||
return '3.0'; | ||
if (viewerVersion.startsWith('2')) { | ||
const minorVersion = +viewerVersion.substring(viewerVersion.indexOf('.') + 1, viewerVersion.indexOf('.', viewerVersion.indexOf('.') + 1)); | ||
if (minorVersion >= 18) { | ||
return '2.0'; | ||
} | ||
else { | ||
return '1.0'; | ||
} | ||
} | ||
if (viewerVersion.startsWith('3')) | ||
return '3.0'; | ||
return '1.0'; | ||
}; | ||
exports.evaluateSettingsVersion = evaluateSettingsVersion; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@shapediver/viewer.settings", | ||
"version": "0.1.14", | ||
"version": "0.1.17", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "license": "polyform-noncommercial-1.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
205603
2196