Skip to content

Commit

Permalink
Fix bugs where the terminal and text previews would not appear.
Browse files Browse the repository at this point in the history
  • Loading branch information
sedwards2009 committed Aug 26, 2020
1 parent 72fb914 commit f13ea76
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
Expand Up @@ -136,7 +136,6 @@ $package-card-background-color: lighten($tool-panel-background-color, 8%);

#syntax_theme_preview, #terminal_theme_preview {
display: block;
width: 100%;
height: 20rem;

& > et-virtual-scroll-canvas {
Expand Down Expand Up @@ -175,7 +174,7 @@ $package-card-background-color: lighten($tool-panel-background-color, 8%);
color: $text-color;
cursor: pointer;
user-select: none;

&:hover {
text-decoration: underline;
}
Expand Down
Expand Up @@ -139,7 +139,6 @@ $package-card-background-color: lighten($tool-panel-background-color, 8%);

#syntax_theme_preview, #terminal_theme_preview {
display: block;
width: 100%;
height: 20rem;

& > et-virtual-scroll-canvas {
Expand Down
@@ -1,17 +1,17 @@
/*
* Copyright 2019 Simon Edwards <simon@simonzone.com>
* Copyright 2020 Simon Edwards <simon@simonzone.com>
*
* This source code is licensed under the MIT license which is detailed in the LICENSE.txt file.
*/
import { CustomElement, Attribute, Observe } from 'extraterm-web-component-decorators';
import { CustomElement } from 'extraterm-web-component-decorators';
import { Logger, getLogger } from 'extraterm-logging';

import { ViewerElement } from '../viewers/ViewerElement';
import { TerminalViewer } from '../viewers/TerminalAceViewer';
import { VirtualScrollCanvas } from '../VirtualScrollCanvas';
import * as Term from '../emulator/Term';
import { TerminalVisualConfig } from '../TerminalVisualConfig';
import { VisualState } from '../viewers/ViewerElementTypes';
import { VisualState, RefreshLevel } from '../viewers/ViewerElementTypes';

export const VUE_TERMINAL_ACE_VIEWER_ELEMENT_TAG = "et-vue-terminal-ace-viewer-element";

Expand Down Expand Up @@ -46,6 +46,8 @@ export class VueTerminalAceViewerElement extends ViewerElement {
this.appendChild(this._scrollCanvas);

emulator.write(demoContents());

this._scrollCanvas.refresh(RefreshLevel.RESIZE);
}
}

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2018 Simon Edwards <simon@simonzone.com>
* Copyright 2020 Simon Edwards <simon@simonzone.com>
*
* This source code is licensed under the MIT license which is detailed in the LICENSE.txt file.
*/
Expand All @@ -9,6 +9,7 @@ import { Logger, getLogger } from 'extraterm-logging';
import { TextViewer } from '../viewers/TextAceViewer';
import { BlobBulkFileHandle } from '../bulk_file_handling/BlobBulkFileHandle';
import { VirtualScrollCanvas } from '../VirtualScrollCanvas';
import { RefreshLevel } from '../viewers/ViewerElementTypes';

export const VUE_TEXT_ACE_VIEWER_ELEMENT_TAG = "et-vue-text-ace-viewer-element";

Expand Down Expand Up @@ -39,6 +40,8 @@ export class VueTextAceViewerElement extends ViewerElement {
this._setMimeType(mimeType);
this._setWrapLines(this.wrapLines);
this.appendChild(this._scrollCanvas);

this._scrollCanvas.refresh(RefreshLevel.RESIZE);
}
}

Expand Down

0 comments on commit f13ea76

Please sign in to comment.