CIDARLAB / 3DuF

Found the usage of undeclared variables JS-0125
Bug risk
Critical
82 occurrences in this check
'activeText' is not defined
1086    switchTo3D() {
1087        if (!this.threeD) {
1088            this.threeD = true;
1089            setButtonColor(this.__button3D, Colors.getDefaultLayerColor(Registry.currentLayer), activeText);1090            setButtonColor(this.__button2D, inactiveBackground, inactiveText);
1091            this.renderer.loadJSON(Registry.currentDevice.toJSON());
1092            let cameraCenter = this.view.getViewCenterInMillimeters();
'inactiveText' is not defined
1069                newCenterY = Registry.currentDevice.params.getValue("height");
1070            }
1071            HTMLUtils.setButtonColor(this.__button2D, Colors.getDefaultLayerColor(Registry.currentLayer), activeText);
1072            HTMLUtils.setButtonColor(this.__button3D, inactiveBackground, inactiveText);1073            Registry.viewManager.setCenter(new paper.Point(newCenterX, newCenterY));
1074            Registry.viewManager.setZoom(zoom);
1075            HTMLUtils.addClass(this.__renderBlock, "hidden-block");
'inactiveBackground' is not defined
1069                newCenterY = Registry.currentDevice.params.getValue("height");
1070            }
1071            HTMLUtils.setButtonColor(this.__button2D, Colors.getDefaultLayerColor(Registry.currentLayer), activeText);
1072            HTMLUtils.setButtonColor(this.__button3D, inactiveBackground, inactiveText);1073            Registry.viewManager.setCenter(new paper.Point(newCenterX, newCenterY));
1074            Registry.viewManager.setZoom(zoom);
1075            HTMLUtils.addClass(this.__renderBlock, "hidden-block");
'activeText' is not defined
1068            } else if (newCenterY > Registry.currentDevice.params.getValue("height")) {
1069                newCenterY = Registry.currentDevice.params.getValue("height");
1070            }
1071            HTMLUtils.setButtonColor(this.__button2D, Colors.getDefaultLayerColor(Registry.currentLayer), activeText);1072            HTMLUtils.setButtonColor(this.__button3D, inactiveBackground, inactiveText);
1073            Registry.viewManager.setCenter(new paper.Point(newCenterX, newCenterY));
1074            Registry.viewManager.setZoom(zoom);
'inactiveText' is not defined
1087        if (!this.threeD) {
1088            this.threeD = true;
1089            setButtonColor(this.__button3D, Colors.getDefaultLayerColor(Registry.currentLayer), activeText);
1090            setButtonColor(this.__button2D, inactiveBackground, inactiveText);1091            this.renderer.loadJSON(Registry.currentDevice.toJSON());
1092            let cameraCenter = this.view.getViewCenterInMillimeters();
1093            let height = Registry.currentDevice.params.getValue("height") / 1000;
'inactiveBackground' is not defined
1087        if (!this.threeD) {
1088            this.threeD = true;
1089            setButtonColor(this.__button3D, Colors.getDefaultLayerColor(Registry.currentLayer), activeText);
1090            setButtonColor(this.__button2D, inactiveBackground, inactiveText);1091            this.renderer.loadJSON(Registry.currentDevice.toJSON());
1092            let cameraCenter = this.view.getViewCenterInMillimeters();
1093            let height = Registry.currentDevice.params.getValue("height") / 1000;
'noUiSlider' is not defined
15        //Create the nouislider
16        let zoom_optimal = Math.log10(Registry.viewManager.view.computeOptimalZoom());
17        //Create the noUiSlider
18        noUiSlider.create(this.__zoomSlider, {19            start: [zoom_optimal],
20            connect: "lower",
21            range: {
172        let content = zipper.generate({
173            type: "blob"
174        });
175        saveAs(content, "Taguchi_DOE.zip");176    }
177
178    __generateOrthogonalDesign(orthogonalArrayElement, paramdata) {
'noUiSlider' is not defined
 56            throw new Error("Could not find HTML element for the grid resolution slider");
 57        }
 58        //Create the noUiSlider
 59        noUiSlider.create(this.__gridResolutionSlider, { 60            start: [500],
 61            connect: "lower",
 62            range: {
'componentHandler' is not defined
 18    slider.setAttribute("value", start);
 19    slider.setAttribute("step", step);
 20    p.appendChild(slider);
 21    componentHandler.upgradeElement(slider, "MaterialSlider"); 22    div.appendChild(p);
 23    return div;
 24};
'componentHandler' is not defined
 30    icon.className = "material-icons";
 31    icon.innerHTML = iconString;
 32    button.appendChild(icon);
 33    componentHandler.upgradeElement(button, "MaterialButton"); 34    return button;
 35};
 36
'componentHandler' is not defined
 54    div.appendChild(span);
 55    div.appendChild(error);
 56    div.setAttribute("style", "margin-left: auto; margin-right: auto; display: block;width:65px;padding-top:0px;padding-bottom:5px;");
 57    componentHandler.upgradeElement(div, "MaterialTextfield"); 58    return div;
 59};
 60
'componentHandler' is not defined
 75    if (checked) input.checked = true;
 76    input.className = "mdl-checkbox__input";
 77    label.appendChild(input);
 78    componentHandler.upgradeElement(label, "MaterialCheckbox"); 79    div.setAttribute("style", "margin-left: auto; margin-right: auto; display: block;width:12px;position:relative;");
 80    div.appendChild(label);
 81    return div;
55            type: "blob"
56        });
57
58        saveAs(content, Registry.currentDevice.getName() + ".zip");59    }
60}
'saveAs' is not defined
65        let json = new Blob([JSON.stringify(Registry.viewManager.generateExportJSON())], {
66            type: "application/json"
67        });
68        saveAs(json, Registry.currentDevice.getName() + ".json");69    }
70}
'saveAs' is not defined
52                let content = zipper.generate({
53                    type: "blob"
54                });
55                saveAs(content, "device_layers.zip");56            }
57        };
58
'Registry' is not defined
 40        // if(this.__paramsToChange['position']){
 41        //     delete this.__paramsToChange['position'];
 42        // }
 43        let allcomponents = Registry.currentDevice.getComponents(); 44
 45        let similarcomponents = [];
 46
'Registry' is not defined
 29            this.__componentTable.deleteRow(-1);
 30        }
 31
 32        let selectedcomponent = Registry.viewManager.view.selectedComponents[0]; 33        let selectedcomponenttype = selectedcomponent.getType();
 34        let params = selectedcomponent.getParams();
 35        this.__paramsToChange = {};
'positionTool' is not defined
4// import SimpleQueue from "../../utils/simpleQueue";
5// var PageSetup = require("../pageSetup");
6
7export default class CopyTool extends positionTool {8    // constructor(typeString, setString, )
9}
 60    }
 61
 62    abort() {
 63        ref.dragging = false; 64        if (this.currentTarget) {
 65            this.currentTarget.remove();
 66        }
'Registry' is not defined
112        }
113
114        for (let i in this.__connections) {
115            let render = Registry.currentDevice.getFeatureByID(this.__connections[i]);116            bounds = render.bounds;
117            if (bounds.x < xmin) {
118                xmin = bounds.x;
'Registry' is not defined
 95        let bounds;
 96
 97        for (let i in this.__components) {
 98            let render = Registry.currentDevice.getFeatureByID(this.__components[i]); 99            bounds = render.bounds;
100            if (bounds.x < xmin) {
101                xmin = bounds.x;
'Registry' is not defined
 70        }
 71
 72        for (let i in this.__otherFeatures) {
 73            let render = Registry.currentDevice.getFeatureByID(this.__otherFeatures[i]); 74            render.selected = true;
 75        }
 76    }
'Registry' is not defined
 64        for (let i in this.__connections) {
 65            let connection = Registry.currentDevice.getConnectionByID(this.__connections[i]);
 66            for (let j in connection.features) {
 67                let render = Registry.currentDevice.getFeatureByID(connection.features[i]); 68                render.selected = true;
 69            }
 70        }
'Registry' is not defined
 62        }
 63
 64        for (let i in this.__connections) {
 65            let connection = Registry.currentDevice.getConnectionByID(this.__connections[i]); 66            for (let j in connection.features) {
 67                let render = Registry.currentDevice.getFeatureByID(connection.features[i]);
 68                render.selected = true;