Skip to content

Commit abcb363

Browse files
committed
minor updates to code snippet
1 parent 70afeb4 commit abcb363

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

src/components/composables/useExportComponent.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ export function useExportComponent() {
248248
let styleString = "";
249249

250250
if(this.componentMap[componentName].htmlAttributes.class !== "") {
251+
console.log(this)
251252
styleString += `.${this.componentMap[componentName].htmlAttributes.class} {\nbackground-color: ${this.componentMap[componentName].color};
252253
width: ${this.componentMap[componentName].w}px;
253254
height: ${this.componentMap[componentName].h}px;

src/components/nav-buttons/SaveProject.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ export default {
4444
},
4545
],
4646
})
47-
.then((res) => this.saveJSONLocation(res.filePath))
48-
.catch((err) => console.log(err));
47+
.then((res) => {
48+
this.saveJSONLocation(res.filePath)
49+
})
50+
.catch((err) => {
51+
console.log(err)});
4952
},
5053
// returns location of where file is stored
5154
parseFileName(file) {
@@ -83,7 +86,10 @@ export default {
8386
localforage
8487
.removeItem(deleteKey)
8588
.then(function () {})
86-
.catch(function (err) {});
89+
.catch(function (err) {
90+
console.log('error')
91+
console.log(err)
92+
});
8793
8894
let fileName = this.parseFileName(data);
8995
// if valid fileName

src/components/right-sidebar/CodeSnippet.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,17 +285,17 @@ export default {
285285
let styleString = "";
286286
287287
if (this.activeComponentObj.htmlAttributes.class !== "") {
288-
styleString += `.${this.activeComponentObj.htmlAttributes.class} { \nbackground- color: ${this.activeComponentObj.color};
289-
width: ${this.activeComponentObj.w} px;
290-
height: ${this.activeComponentObj.h} px;
291-
z - index: ${this.activeComponentObj.z};
292-
} \n`
288+
styleString += `.${this.activeComponentObj.htmlAttributes.class} { \n background-color: ${this.activeComponentObj.color};
289+
width: ${this.activeComponentObj.w} px;
290+
height: ${this.activeComponentObj.h} px;
291+
z-index: ${this.activeComponentObj.z};
292+
} \n`
293293
}
294294
295295
for (const html of htmlArray) {
296296
if (html.class === ' ') styleString = "";
297297
if (html.class) {
298-
styleString += `.${html.class} {\n height: ${html.h}%, \n width: ${html.w}%, \n top: ${html.x}%, \n left: ${html.y}%, \n z-index: ${html.z}
298+
styleString += `.${html.class} {\n height: ${html.h}%; \n width: ${html.w}%; \n top: ${html.x}%; \n left: ${html.y}%; \n z-index: ${html.z};
299299
}\n`
300300
}
301301
}

0 commit comments

Comments
 (0)