Skip to content

Commit 68436d2

Browse files
Merge pull request RAJAGOPALAN-GANGADHARAN#49 from RAJAGOPALAN-GANGADHARAN/aritroCoder/rebased
Resolves Fullscreen toggle bug
2 parents 60cf094 + c8e8f0f commit 68436d2

File tree

3 files changed

+21
-34
lines changed

3 files changed

+21
-34
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ npm-debug.log*
2020
yarn-debug.log*
2121
yarn-error.log*
2222

23-
package-lock.json
23+
/package-lock.json

src/desktop/desktop.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,11 @@ export default class Desktop extends Component
2525
*/
2626
//bind
2727
this.backgroundSetter=this.backgroundSetter.bind(this);
28-
this.goFullScreen=this.goFullScreen.bind(this);
29-
//this.adder=this.adder.bind(this);
30-
//this.closer=this.closer.bind(this);
3128
this.state={
3229
bgimage:null,isFull:false,visible:false,desktopIcons:null
3330
};
3431

3532
}
36-
goFullScreen()
37-
{
38-
this.setState({ isFull: true });
39-
}
40-
4133
getWidgets()
4234
{
4335
let wtemp=[]
@@ -62,7 +54,7 @@ export default class Desktop extends Component
6254
for (var fcnt in currDisk.folderContents) {
6355
let currentObject = currDisk.folderContents[fcnt];
6456
console.log(xaxis,yaxis)
65-
if (currentObject.isFolder == true) {
57+
if (currentObject.isFolder === true) {
6658
let currentName = currentObject.folderName;
6759
rightPaneHolder.push(
6860
<div className="iconHolderDesktop" style={{ top: `${yaxis}px`,left:`${xaxis}px` }} onClick={() => { eventDispatcher('Explorer',null,currentObject) }}>
@@ -119,8 +111,8 @@ export default class Desktop extends Component
119111
render()
120112
{
121113
return(
122-
<Fullscreen enabled={this.state.isFull} onChange={isFull => this.setState({isFull})}>
123-
<ContextMenu />
114+
<Fullscreen enabled={this.state.isFull}>
115+
<ContextMenu />
124116
<div id="emptyDragclass"></div>
125117
<div id="launcher">
126118
</div>

src/desktop/notification/notification.js

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
1-
import React,{Component} from 'react';
1+
import React, { Component } from 'react';
22
import './notification.css';
33
import Status from './statusicons/status';
4-
import {theme_color_panels,notify_status} from '../../globalvariables';
5-
import { FaExpand,FaBell, FaGithub, FaLinkedin, FaEnvelope, FaAt, FaStar } from 'react-icons/fa';
4+
import { theme_color_panels, notify_status } from '../../globalvariables';
5+
import { FaExpand, FaBell, FaGithub, FaLinkedin, FaEnvelope, FaAt, FaStar } from 'react-icons/fa';
66

7-
export default class Panel extends Component
8-
{
9-
constructor(props)
10-
{
7+
export default class Panel extends Component {
8+
constructor(props) {
119
super(props);
12-
this.expand=this.expand.bind(this);
13-
this.state={panelcolor:theme_color_panels,paneltype:'solid'};
10+
this.expand = this.expand.bind(this);
11+
this.state = { panelcolor: theme_color_panels, paneltype: 'solid' };
1412
}
15-
expand()
16-
{
17-
this.props.parent_class.setState({ isFull: true });
13+
14+
expand() {
15+
this.props.parent_class.setState({ isFull: !this.props.parent_class.state.isFull })
1816
}
19-
nullBind()
20-
{
17+
nullBind() {
2118

2219
}
23-
gitHubIcon=()=>
24-
{
20+
gitHubIcon = () => {
2521
window.open("https://github.com/RAJAGOPALAN-GANGADHARAN/", "_blank")
2622
}
2723
linkedin = () => {
@@ -33,16 +29,15 @@ export default class Panel extends Component
3329
repo = () => {
3430
window.open("https://github.com/RAJAGOPALAN-GANGADHARAN/JS-OS", "_blank");
3531
}
36-
render()
37-
{
38-
return(
39-
<div id="notificationpanel" style={{backgroundColor:this.state.panelcolor}}>
40-
<Status icon={<FaExpand/>} event={this.expand} styles="expand_icon"/>
32+
render() {
33+
return (
34+
<div id="notificationpanel" style={{ backgroundColor: this.state.panelcolor }}>
35+
<Status icon={<FaExpand />} event={this.expand} styles="expand_icon" />
4136
{notify_status ? (<Status icon={<FaBell />} event={this.nullBind} />) : (<Status icon={<FaBell />} event={this.nullBind} />)}
4237
<Status icon={<FaGithub />} event={this.gitHubIcon} />
4338
<Status icon={<FaLinkedin />} event={this.linkedin} />
4439
<Status icon={<FaAt />} event={this.mailto} />
45-
<Status icon={<FaStar/>} event={this.repo}/>
40+
<Status icon={<FaStar />} event={this.repo} />
4641
</div>
4742
)
4843
}

0 commit comments

Comments
 (0)