Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes after designer review #197

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/preview/buttons/buttons.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@
<div class="btn-cell">
<div class="btn-list">
<dx-button
text="BUTTON"
text="Button"
type="default"
[stylingMode]="mode"
[disabled]="disabled"
(onContentReady)="initState ? initState($event) : null"
></dx-button>
<dx-button
text="BUTTON"
text="Button"
icon="favorites"
type="default"
[stylingMode]="mode"
Expand Down
4 changes: 2 additions & 2 deletions src/app/preview/editors/editors.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<ng-template #collapsedBlock>
<dx-text-box width="140" value="Text Box"></dx-text-box>
<dx-tag-box width="140" [items]="['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']" [value]="['Monday']"></dx-tag-box>
<dx-tag-box width="140" [multiline]="false" [items]="['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']" [value]="['Monday']"></dx-tag-box>
<dx-select-box width="140" [items]="['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']"></dx-select-box>
<dx-lookup width="140" [items]="['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']"></dx-lookup>
<dx-check-box [value]="true"></dx-check-box>
Expand Down Expand Up @@ -40,7 +40,7 @@
</dx-text-box>
</div>
<div class="field daterangebox">
<dx-date-range-box stylingMode="outlined" [dropDownOptions]="dropDownOptions"></dx-date-range-box>
<dx-date-range-box stylingMode="outlined" [dropDownOptions]="dropDownOptions" [labelMode]="labelMode"></dx-date-range-box>
</div>
</div>
<div class="block filled">
Expand Down
2 changes: 1 addition & 1 deletion src/app/preview/preview/preview.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}

.component-display:hover,
.component-item.component-item--active .component-display {
.component-item.selected-component-item .component-display {
border-color: #2190F7;
}

Expand Down
4 changes: 4 additions & 0 deletions src/app/preview/preview/preview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export class PreviewComponent implements AfterViewInit, OnChanges {

createPreviewContent(widget: any): void {
const EXPAND_CLASS_NAME = 'component-item--active';
const SELECTED_ITEM_CLASS_NAME = 'selected-component-item';
const flexContainers = document.getElementsByClassName('component-item');
const scrollableContainer = this.scrollView.instance.element().querySelector('.dx-scrollable-container');
const currentWidget: string = widget.currentValue || widget;
Expand All @@ -38,6 +39,7 @@ export class PreviewComponent implements AfterViewInit, OnChanges {
/* eslint @typescript-eslint/prefer-for-of: 'off' */
for(let i = 0; i < flexContainers.length; i++) {
flexContainers[i].classList.remove(EXPAND_CLASS_NAME);
flexContainers[i].classList.remove(SELECTED_ITEM_CLASS_NAME);
}

this.widgetElements.forEach((widgetEl) => {
Expand All @@ -63,6 +65,8 @@ export class PreviewComponent implements AfterViewInit, OnChanges {
const flexParentContainer = widgetContainer[0].parentElement.parentElement;
const scrollTop = 30;

flexParentContainer.classList.add(SELECTED_ITEM_CLASS_NAME);

if(this.notExpandableWidgets.indexOf(currentWidget) >= 0) {
scrollableContainer.scrollTo({
top: flexParentContainer.offsetTop - scrollTop,
Expand Down
1 change: 0 additions & 1 deletion src/app/preview/treeview/treeview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export class TreeviewComponent {
{
id: 11,
text: 'Individual Platforms',
selected: true,
items: [
{ id: 111, text: 'WinForms' },
{ id: 112, text: 'ASP.NET' },
Expand Down
Loading