Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb7108e7

Browse files
committed
fix for atom 1.6
1 parent47470eb commitb7108e7

File tree

9 files changed

+19
-17
lines changed

9 files changed

+19
-17
lines changed

‎lib/atom/editor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ exports.setAtomGlobals = setAtomGlobals;
1313
vargetEditorCount=0;
1414
functionsave(){
1515
vareditor=findEditor();
16-
console.log(editor);
1716
editor.save();
1817
}
1918
exports.save=save;
2019
functionfindEditor(){
2120
vareditor=atom.workspace.getActiveTextEditor();
21+
varmax=1000;
2222
if(!editor){
2323
getEditorCount+=1;
2424
setTimeout(function(){
2525
returnfindEditor();
2626
},10);
2727
}
28-
elseif(getEditorCount>1000){
28+
elseif(getEditorCount>max){
2929
console.log('Failed to find active editor');
30-
returnundefined;
30+
returnnull;
3131
}
3232
else{
3333
getEditorCount=0;

‎lib/atom/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ var Main = (function () {
1616
}
1717
Main.prototype.activate=function(){
1818
atom.workspace.addRightPanel({
19-
item:this.root
19+
item:this.root,
20+
priority:0
2021
});
2122
subscriptions_1.onActivateSubscriptions();
2223
render_1.render(this.root);

‎lib/components/app/app.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ var default_1 = (function (_super) {
2626
}
2727
default_1.prototype.render=function(){
2828
varstate=this.props.state;
29-
return(React.createElement("section",{className:'cr',key:'main'},React.createElement(_components_1.Menu,{route:state.route,position:state.position}),React.createElement(_components_1.Router,{state:state}),React.createElement(_components_1.Alert,{alert:state.alert})));
29+
varheight=atom.getCurrentWindow().getBounds().height;
30+
return(React.createElement("section",{className:'cr',key:'main',style:{height:height}},React.createElement(_components_1.Menu,{route:state.route,position:state.position}),React.createElement(_components_1.Router,{state:state,ref:'route'}),React.createElement(_components_1.Alert,{alert:state.alert})));
3031
};
3132
default_1=__decorate([
3233
ThemeDecorator(ThemeManager.getMuiTheme(theme_1.default)),

‎package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"react":"0.14.7",
4444
"react-dom":"0.14.7",
4545
"react-redux":"4.4.0",
46+
"react-scrollbar":"^0.4.0",
4647
"react-tap-event-plugin":"0.2.2",
4748
"redux":"3.3.1"
4849
},

‎src/atom/editor.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,27 @@ let getEditorCount = 0;
1313

1414
exportfunctionsave(){
1515
consteditor=findEditor();
16-
console.log(editor);
1716
editor.save();
1817
}
1918

20-
exportfunctionfindEditor(){
19+
exportfunctionfindEditor():AtomCore.IEditor{
2120
leteditor=atom.workspace.getActiveTextEditor();
21+
constmax=1000;
2222
if(!editor){
2323
getEditorCount+=1;
2424
setTimeout(function(){
2525
returnfindEditor();
2626
},10);
27-
}elseif(getEditorCount>1000){
27+
}elseif(getEditorCount>max){
2828
console.log('Failed to find active editor');
29-
returnundefined;
29+
returnnull;
3030
}else{
3131
getEditorCount=0;
3232
returneditor;
3333
}
3434
}
3535

36-
exportfunctiongetEditor(){
36+
exportfunctiongetEditor():Promise<AtomCore.IEditor>{
3737
returnnewPromise((resolve,reject)=>{
3838
resolve(findEditor());
3939
});

‎src/atom/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ class Main {
2121
activate():void{
2222
// create atom panel
2323
atom.workspace.addRightPanel({
24-
item:this.root
24+
item:this.root,
25+
priority:0
2526
});
2627
onActivateSubscriptions();
2728
// render React component

‎src/components/_index.less

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
@import'./start/_start';
99

1010
#crv {
11-
min-height:600px;
12-
height:100%;
1311
position:relative;
1412
overflow-y:scroll;
1513
}

‎src/components/app/app.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ import Theme from '../theme/theme';
1212
exportdefaultclassextendsReact.Component<{state?:CR.State},{}>{
1313
render():React.ReactElement<{}>{
1414
conststate=this.props.state;
15+
constheight=atom.getCurrentWindow().getBounds().height;
1516
return(
16-
<sectionclassName='cr'key='main'>
17+
<sectionclassName='cr'key='main'style={{height}}>
1718
<Menuroute={state.route}position={state.position}/>
18-
<Routerstate={state}/>
19+
<Routerstate={state}ref='route'/>
1920
<Alertalert={state.alert}/>
2021
</section>
22+
2123
);
2224
}
2325
};

‎styles/styles.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ atom-panel-container > atom-panel > #crv {
158158
padding:10px;
159159
}
160160
#crv {
161-
min-height:600px;
162-
height:100%;
163161
position: relative;
164162
overflow-y: scroll;
165163
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp