8000 remove old code and bypass some warning by fpliger · Pull Request #59 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

remove old code and bypass some warning #59

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

Merged
merged 8 commits into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
remove old code and bypass some warning
  • Loading branch information
fpliger committed Apr 28, 2022
commit cb61908e83dfd2c2c7eadb94ab3858593cc55ab3
1 change: 1 addition & 0 deletions pyscriptjs/src/components/pybox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class PyBox extends HTMLElement {

this.widths.forEach((width, index)=>{
const node: ChildNode = mainDiv.childNodes[index];
// @ts-ignore
addClasses(node, [width, 'mx-4'])

})
Expand Down
27 changes: 0 additions & 27 deletions pyscriptjs/src/components/pyscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ mode.subscribe(value => {
currentMode = value;
});

function createCmdHandler(el) {
// Creates a codemirror cmd handler that calls the el.evaluate when an event
// triggers that specific cmd
const toggleCheckbox: StateCommand = ({ state, dispatch }) => {
return el.evaluate(state);
};
return toggleCheckbox;
}

// TODO: use type declaractions
type PyodideInterface = {
Expand Down Expand Up @@ -104,25 +96,6 @@ export class PyScript extends BaseEvalElement {
this.checkId();
this.code = this.innerHTML;
this.innerHTML = '';
const startState = EditorState.create({
doc: this.code,
extensions: [
keymap.of([
...defaultKeymap,
{ key: 'Ctrl-Enter', run: createCmdHandler(this) },
{ key: 'Shift-Enter', run: createCmdHandler(this) },
]),
oneDarkTheme,
python(),
// Event listener function that is called every time an user types something on this editor
// EditorView.updateListener.of((v:ViewUpdate) => {
// if (v.docChanged) {
// console.log(v.changes);

// }
// })
],
});

const mainDiv = document.createElement('div');
addClasses(mainDiv, ['parentBox', 'flex', 'flex-col', 'mx-8']);
Expand Down
0