From 54048114bca3a01a6d287112d975edd00a4e398a Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Sat, 16 Mar 2019 16:47:06 -0400 Subject: Fixed DocumentContents stuff --- src/debug/Test.tsx | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) (limited to 'src/debug') diff --git a/src/debug/Test.tsx b/src/debug/Test.tsx index 7bc70615f..c8de33f41 100644 --- a/src/debug/Test.tsx +++ b/src/debug/Test.tsx @@ -1,46 +1,29 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; +import JsxParser from 'react-jsx-parser' -class TestInternal extends React.Component { - onContextMenu = (e: React.MouseEvent) => { - console.log("Internal"); - e.stopPropagation(); - } - - onPointerDown = (e: React.MouseEvent) => { - console.log("pointer down") - e.preventDefault(); - } - - render() { - return
Hello world
- } -} - -class TestChild extends React.Component { - onContextMenu = () => { - console.log("Child"); - } - +class Hello extends React.Component<{ firstName: string, lastName: string }> { render() { - return
+ return
Hello {this.props.firstName} {this.props.lastName}
} } -class TestParent extends React.Component { - onContextMenu = () => { - console.log("Parent"); - } - +class Test extends React.Component { render() { - return
+ let jsx = ""; + let bindings = { + props: { + firstName: "First", + lastName: "Last" + } + } + return } } ReactDOM.render((
- +
), document.getElementById('root') ); \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 0476ae26662ac8a2f4232b0fb5f7b13bf7c425d4 Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Mon, 18 Mar 2019 00:46:35 -0400 Subject: Debugger changes --- src/debug/Viewer.tsx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/debug') diff --git a/src/debug/Viewer.tsx b/src/debug/Viewer.tsx index 780e9f8f2..e6ad0f540 100644 --- a/src/debug/Viewer.tsx +++ b/src/debug/Viewer.tsx @@ -137,11 +137,14 @@ class DebugViewer extends React.Component<{ fieldId: string }> { content = () } else if (this.field instanceof Key) { content = () + } else { + content = (Unrecognized field type) } } else if (this.error) { content = Field {this.props.fieldId} not found } else { content = <>Field loading + console.log(this.props.fieldId); } return content; } -- cgit v1.2.3-70-g09d2 From d4e5c26021aadfcdfefee105493dc6e55d10fe6c Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Mon, 18 Mar 2019 00:49:16 -0400 Subject: Debugger changes --- src/debug/Viewer.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/debug') diff --git a/src/debug/Viewer.tsx b/src/debug/Viewer.tsx index e6ad0f540..7fdd77bf3 100644 --- a/src/debug/Viewer.tsx +++ b/src/debug/Viewer.tsx @@ -143,8 +143,7 @@ class DebugViewer extends React.Component<{ fieldId: string }> { } else if (this.error) { content = Field {this.props.fieldId} not found } else { - content = <>Field loading - console.log(this.props.fieldId); + content = Field loading: {this.props.fieldId} } return content; } -- cgit v1.2.3-70-g09d2