fix webpack-zip, fix setAxisIndex when relative

This commit is contained in:
Stewart Allen 2025-07-14 19:01:01 -04:00
commit a8f15e174a
2 changed files with 2 additions and 2 deletions

View file

@ -111,7 +111,7 @@
"webpack-ext": "npm run webpack-three && npm run webpack-zip",
"webpack-src": "node bin/esbuild.config.mjs",
"webpack-three": "npx webpack --config bin/webpack-three-esm.js",
"webpack-zip": "npx webpack --config bin/webpack-three-esm.js"
"webpack-zip": "npx webpack --config bin/webpack-jszip-esm.js"
},
"main": "app-el.js",
"build": {

View file

@ -222,7 +222,7 @@ export async function cam_slice(settings, widget, onupdate, ondone) {
}
function setAxisIndex(degrees = 0, absolute = true) {
axisIndex = absolute ? degrees : axisIndex + degrees;
axisIndex = absolute ? degrees : (axisIndex || 0) + degrees;
axisRotation = (Math.PI / 180) * axisIndex;
widget.setAxisIndex(isIndexed ? -axisIndex : 0);
return isIndexed ? -axisIndex : 0;