formatting
This commit is contained in:
parent
a51075a15d
commit
c439f7bb21
1 changed files with 3 additions and 6 deletions
|
|
@ -1,11 +1,8 @@
|
||||||
import { api } from "../../core/api.js";
|
import { api } from "../../core/api.js";
|
||||||
import { CAM } from "./driver-fe.js";
|
import { CAM } from "./driver-fe.js";
|
||||||
|
|
||||||
import { clearPops, env } from "./client.js";
|
import { clearPops, env } from "./client.js";
|
||||||
|
|
||||||
|
|
||||||
let alert, lastWidget;
|
let alert, lastWidget;
|
||||||
|
|
||||||
export let helicalOn = false;
|
export let helicalOn = false;
|
||||||
export function selectHelical() {
|
export function selectHelical() {
|
||||||
if (helicalOn) {
|
if (helicalOn) {
|
||||||
|
|
@ -20,7 +17,7 @@ export function selectHelical() {
|
||||||
alert = api.show.alert("[esc] cancels surface selection");
|
alert = api.show.alert("[esc] cancels surface selection");
|
||||||
for (let [wid, arr] of Object.entries(cylinders)) {
|
for (let [wid, arr] of Object.entries(cylinders)) {
|
||||||
let widget = api.widgets.forid(wid);
|
let widget = api.widgets.forid(wid);
|
||||||
if (widget && arr?.length)
|
if ( widget && arr?.length )
|
||||||
for (let faceid of arr) {
|
for (let faceid of arr) {
|
||||||
CAM.cylinderToggle(widget, faceid, (faceids) => {
|
CAM.cylinderToggle(widget, faceid, (faceids) => {
|
||||||
// cylinders[widget.id] = faceids;
|
// cylinders[widget.id] = faceids;
|
||||||
|
|
@ -36,7 +33,7 @@ export function selectHelical() {
|
||||||
let faceid = min / 3;
|
let faceid = min / 3;
|
||||||
let widget = (lastWidget = obj.object.widget);
|
let widget = (lastWidget = obj.object.widget);
|
||||||
CAM.cylinderToggle(widget, faceid, ({ faces, error }) => {
|
CAM.cylinderToggle(widget, faceid, ({ faces, error }) => {
|
||||||
if (error) {
|
if ( error ) {
|
||||||
api.show.alert(error, 3000);
|
api.show.alert(error, 3000);
|
||||||
console.log( error );
|
console.log( error );
|
||||||
return;
|
return;
|
||||||
|
|
@ -47,7 +44,7 @@ export function selectHelical() {
|
||||||
};
|
};
|
||||||
|
|
||||||
export function helicalDone(){
|
export function helicalDone(){
|
||||||
if (!(helicalOn && env.poppedRec && env.poppedRec.cylinders)) {
|
if (!( helicalOn && env.poppedRec && env.poppedRec.cylinders )) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let { cylinders } = env.poppedRec;
|
let { cylinders } = env.poppedRec;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue