Skip to content

Commit 055d380

Browse files
committed
refactor: refactor, fixes
1 parent 785e0df commit 055d380

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

src/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151

5252
<log
5353
ref="log"
54+
:elements="logElements"
5455
>
55-
5656
</log>
5757

5858
<!-- content -->

src/js/app.js

+7
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ export let app;
9595
dataElements() {
9696
return this.dataTest;
9797
},
98+
logElements() {
99+
return this.elements.map(({ boxId, type, defaultParams }) => ({
100+
boxId,
101+
type,
102+
defaultParams
103+
}));
104+
},
98105
...mapState("Interface", ["elements", "links"]),
99106
...mapState("Keyboard", ["ctrl", "space"])
100107
},

src/js/layout/components/Log.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66

77
import Vue from "vue";
88
import Paper from "../../classes/Paper";
9-
import { mapState } from "vuex";
109
import { Constants, Validation } from "divaservices-utils";
1110
const { Types } = Constants;
1211

1312
const Log = Vue.component("Log", {
13+
props: ["elements"],
1414
data() {
1515
return {
1616
activated: false // hacky variable to activate openWorkflow initial push
1717
};
1818
},
1919
computed: {
20-
...mapState("Interface", ["elements"]),
20+
//@TODO watch for differences
2121
messages() {
2222
const tmp = [];
2323
for (const { boxId, type: name, defaultParams } of this.elements) {
@@ -30,7 +30,6 @@ const Log = Vue.component("Log", {
3030
tmp.push({ value, paramName, paramType, name, boxId });
3131
}
3232
} catch (e) {
33-
console.log(e);
3433
tmp.push({ value, paramName, paramType, name, boxId });
3534
}
3635
});

src/js/layout/components/toolsbar.js

-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ const Toolsbar = Vue.component("Toolsbar", {
179179
return Math.ceil(this.scale * 100);
180180
}
181181
},
182-
// @TODO search done twice because of a
183182
template: `
184183
<div id="${TOOLSBAR}">
185184
<div v-for="group in toolsbarIcons" class="group">

src/js/layout/inputs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ export const checkInputValue = input => {
355355
const currentVal = input.val();
356356
const { min, max, step } = input.data();
357357

358-
let isValid = true;
358+
let isValid = false;
359359
try {
360360
isValid = Validation.checkValue(currentVal, Types.NUMBER.type, {
361361
min,

src/js/store/plugins/HighlightPlugin.js

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const HighlightPlugin = store => {
1414
case "Interface/UNSELECT_ALL_ELEMENTS":
1515
case "Interface/ADD_UNIQUE_ELEMENT_TO_SELECTION":
1616
case "Interface/ADD_ELEMENTS_TO_SELECTION": {
17-
console.log(type, Interface);
1817
for (const element of Interface.elements) {
1918
const cellView = Paper.getViewFromBoxId(element.boxId);
2019
if (element.selected) {

0 commit comments

Comments
 (0)