Skip to content

Commit da8232c

Browse files
author
pipeline
committed
config(EJ2-3013): Committing for sample browser moved to cloud
1 parent efe81e7 commit da8232c

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

src/common/sb.component.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,20 @@ export class SBController {
158158
mouseButton.element.classList.remove('active');
159159
touchButton.element.classList.add('active');
160160
}
161-
161+
let mouseOrTouch: string = localStorage.getItem('ej2-ng-switch');
162+
if(mouseOrTouch) {
163+
if(mouseOrTouch === 'mouse') {
164+
document.body.classList.remove('e-bigger');
165+
} else {
166+
document.body.classList.add('e-bigger');
167+
}
168+
let target: HTMLElement = <HTMLElement>select('#'+mouseOrTouch);
169+
let current: string = mouseOrTouch === 'mouse' ? 'touch' : 'mouse';
170+
let curSelected: HTMLElement = <HTMLElement>select('#'+current);
171+
curSelected.classList.remove('active');
172+
target.classList.add('active');
173+
}
174+
localStorage.removeItem('ej2-ng-switch');
162175
}
163176

164177
ngAfterViewInit(): void {
@@ -219,15 +232,10 @@ export class SBController {
219232
let curSelected: HTMLElement = <HTMLElement>select('.switcher .active');
220233
if (curSelected.id === targetId) {
221234
return;
222-
}
223-
if (targetId === 'mouse') {
224-
document.body.classList.remove('e-bigger');
225235
} else {
226-
document.body.classList.add('e-bigger');
236+
localStorage.setItem('ej2-ng-switch', targetId);
237+
location.reload();
227238
}
228-
curSelected.classList.remove('active');
229-
(<HTMLElement>e.target).classList.add('active');
230-
window.dispatchEvent(new Event('resize'));
231239
}
232240
onSourceTabClick(e: Event): void {
233241
let curEle: HTMLElement = e.target as HTMLElement;

src/grid/column/autowrap.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</ej-grid>
1111

1212
<div style="margin-top: 10px; text-align: right">Source:
13-
<a href="https://en.wikipedia.org/wiki/List_of_prolific_inventors" target='_blank'>Wikipedia: List of Profolic inventors</a>
13+
<a href="https://en.wikipedia.org/wiki/List_of_prolific_inventors" target='_blank'>Wikipedia: List of Prolific inventors</a>
1414
</div>
1515

1616
<div id='description'>

src/grid/grouping.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</e-columns>
1111
</ej-grid>
1212
<div style="margin-top: 10px; text-align: right">Source:
13-
<a href="https://en.wikipedia.org/wiki/List_of_prolific_inventors" target='_blank'>Wikipedia: List of Profolic inventors</a>
13+
<a href="https://en.wikipedia.org/wiki/List_of_prolific_inventors" target='_blank'>Wikipedia: List of Prolific inventors</a>
1414
</div>
1515

1616
<div id="description">

0 commit comments

Comments
 (0)