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

Commitcb61908

Browse files
committed
remove old code and bypass some warning
1 parentb207db9 commitcb61908

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

‎pyscriptjs/src/components/pybox.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export class PyBox extends HTMLElement {
5656

5757
this.widths.forEach((width,index)=>{
5858
constnode:ChildNode=mainDiv.childNodes[index];
59+
//@ts-ignore
5960
addClasses(node,[width,'mx-4'])
6061

6162
})

‎pyscriptjs/src/components/pyscript.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,6 @@ mode.subscribe(value => {
3939
currentMode=value;
4040
});
4141

42-
functioncreateCmdHandler(el){
43-
// Creates a codemirror cmd handler that calls the el.evaluate when an event
44-
// triggers that specific cmd
45-
consttoggleCheckbox:StateCommand=({ state, dispatch})=>{
46-
returnel.evaluate(state);
47-
};
48-
returntoggleCheckbox;
49-
}
5042

5143
// TODO: use type declaractions
5244
typePyodideInterface={
@@ -104,25 +96,6 @@ export class PyScript extends BaseEvalElement {
10496
this.checkId();
10597
this.code=this.innerHTML;
10698
this.innerHTML='';
107-
conststartState=EditorState.create({
108-
doc:this.code,
109-
extensions:[
110-
keymap.of([
111-
...defaultKeymap,
112-
{key:'Ctrl-Enter',run:createCmdHandler(this)},
113-
{key:'Shift-Enter',run:createCmdHandler(this)},
114-
]),
115-
oneDarkTheme,
116-
python(),
117-
// Event listener function that is called every time an user types something on this editor
118-
// EditorView.updateListener.of((v:ViewUpdate) => {
119-
// if (v.docChanged) {
120-
// console.log(v.changes);
121-
122-
// }
123-
// })
124-
],
125-
});
12699

127100
constmainDiv=document.createElement('div');
128101
addClasses(mainDiv,['parentBox','flex','flex-col','mx-8']);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp