Fix API stuff

This commit is contained in:
JannisX11 2022-07-26 18:44:56 +02:00
parent fde215f6db
commit 6eb5160b8e
3 changed files with 11 additions and 3 deletions

View File

@ -56,13 +56,13 @@ class ResizeLine {
if (data.top !== undefined) {
jq.css('top', data.top+'px')
}
if (data.bottom !== undefined && (!data.horizontal || data.top === undefined)) {
if (data.bottom !== undefined && (!this.horizontal || data.top === undefined)) {
jq.css('bottom', data.bottom+'px')
}
if (data.left !== undefined) {
jq.css('left', data.left+'px')
}
if (data.right !== undefined && (data.horizontal || data.left === undefined)) {
if (data.right !== undefined && (this.horizontal || data.left === undefined)) {
jq.css('right', data.right+'px')
}
}

View File

@ -77,7 +77,7 @@ Object.defineProperty(window, 'selected', {
}
});
//Colors
var markerColors = [
const markerColors = [
{pastel: "#A2EBFF", standard: "#58C0FF", id: 'light_blue'},
{pastel: "#FFF899", standard: "#F4D714", id: 'yellow'},
{pastel: "#F1BB75", standard: "#EC9218", id: 'orange'},

View File

@ -42,6 +42,10 @@ class PreviewScene {
Canvas.global_light_side = 0;
Canvas.updateShading();
}
delete() {
delete PreviewScene.scenes[this.id];
delete PreviewScene.select_options[this.id];
}
}
PreviewScene.scenes = {};
PreviewScene.active = null;
@ -52,6 +56,7 @@ PreviewScene.select_options = {
class PreviewModel {
constructor(id, data) {
PreviewModel.models[id] = this;
this.id = id;
this.condition = data.condition;
this.model_3d = new THREE.Object3D();
this.onUpdate = data.onUpdate;
@ -164,6 +169,9 @@ class PreviewModel {
})
return this;
}
delete() {
delete PreviewModel.models[id];
}
}
PreviewModel.models = {};
PreviewModel.getActiveModels = function() {