Skip to content

Commit

Permalink
fixes per linter
Browse files Browse the repository at this point in the history
  • Loading branch information
electric-el committed May 19, 2022
1 parent 62eafe6 commit bb8d86f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/classes/code-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export default class CodeViewer {
this.$orgs['#patternlab-body'].dispatchAction('removeClass', 'viewall');
}

let dockOpen;

switch (data.event) {
case 'patternlab.keyPress':
switch (data.keyPress) {
Expand Down Expand Up @@ -314,9 +316,6 @@ export default class CodeViewer {
return this.setPanelContent(type)
.then(() => this.gitPullMarkdown());
}

/* istanbul ignore next */
break;
}
default: {
return this.setPanelContent(type, this.patternPartial);
Expand Down Expand Up @@ -821,7 +820,7 @@ export default class CodeViewer {
const sgCodeContainerState = this.$orgs['#sg-code-container'].getState();

if (!sgCodeContainerState.classArray.includes('active')) {
return
return;
}

const sgCodeTabState = this.$orgs['.sg-code-tab'].getState();
Expand Down
9 changes: 9 additions & 0 deletions scripts/listeners/code-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ export default class CodeViewer {
if (dockOpen) {
this.#fepperUi.viewerHandler.dockLeft();
}

e.preventDefault();
return false;
});

// Dock Code Viewer to the bottom.
Expand All @@ -252,6 +255,9 @@ export default class CodeViewer {
if (dockOpen) {
this.#fepperUi.viewerHandler.dockBottom();
}

e.preventDefault();
return false;
});

// Dock Code Viewer to the right.
Expand All @@ -261,6 +267,9 @@ export default class CodeViewer {
if (dockOpen) {
this.#fepperUi.viewerHandler.dockRight();
}

e.preventDefault();
return false;
});
}
}

0 comments on commit bb8d86f

Please sign in to comment.