|
45 | 45 | }; |
46 | 46 |
|
47 | 47 | const onUploadGestures = () => { |
48 | | - filePicker.click() |
| 48 | + filePicker.click(); |
49 | 49 | }; |
50 | 50 |
|
51 | 51 | const updateInspector = (newPoint: Vector3, newPosition: {x: number, y: number}) => { |
52 | | - inspectedDataPoint = newPoint |
53 | | - inspectorPosition = newPosition |
54 | | - isInspectorOpen = true |
| 52 | + inspectedDataPoint = newPoint; |
| 53 | + inspectorPosition = newPosition; |
| 54 | + isInspectorOpen = true; |
55 | 55 | } |
56 | 56 |
|
57 | 57 | const closeInspector = () => { |
58 | | - isInspectorOpen = false |
| 58 | + isInspectorOpen = false; |
59 | 59 | } |
60 | 60 |
|
61 | 61 |
|
62 | | - let filePicker: HTMLInputElement |
| 62 | + let filePicker: HTMLInputElement; |
63 | 63 | onMount(() => { |
64 | | - filePicker = document.createElement('input') |
65 | | - filePicker.type = 'file' |
66 | | - filePicker.accept = 'application/JSON' |
| 64 | + filePicker = document.createElement('input'); |
| 65 | + filePicker.type = 'file'; |
| 66 | + filePicker.accept = 'application/JSON'; |
67 | 67 | filePicker.onchange = () => { |
68 | | - if (filePicker.files == null || filePicker.files.length < 1){ |
69 | | - return |
| 68 | + if (filePicker.files == null || filePicker.files.length < 1) { |
| 69 | + return; |
70 | 70 | } |
71 | | - const f = filePicker.files[0] |
72 | | - loadDatasetFromFile(f) |
73 | | - filePicker.value = '' // To trick element to trigger onChange if same file selected |
| 71 | + const f = filePicker.files[0]; |
| 72 | + loadDatasetFromFile(f); |
| 73 | + filePicker.value = ''; // To trick element to trigger onChange if same file selected |
74 | 74 | } |
75 | 75 | return () => { |
76 | | - filePicker.remove() |
77 | | - } |
78 | | - }) |
79 | | -
|
| 76 | + filePicker.remove(); |
| 77 | + }; |
| 78 | + }); |
80 | 79 | </script> |
81 | 80 |
|
82 | 81 | <!-- Main pane --> |
83 | | -<main class="h-full flex flex-col"> |
| 82 | +<main class="h-full inline-block min-w-full"> |
84 | 83 | <RecordingInspector |
85 | 84 | dataPoint={$graphInspectorState.dataPoint} |
86 | 85 | position={$graphInspectorState.inspectorPosition} |
|
96 | 95 | {onUploadGestures} /> |
97 | 96 | </div> |
98 | 97 | {#if !hasSomeData() && !$state.isInputConnected} |
99 | | - <div class="flex flex-col flex-grow justify-center"> |
| 98 | + <div class="mt-4"> |
100 | 99 | <PleaseConnectFirst /> |
101 | 100 | </div> |
102 | 101 | {:else} |
|
0 commit comments