Spaces:
Running
Running
Update static/canvas.js
Browse files- static/canvas.js +5 -5
static/canvas.js
CHANGED
@@ -352,9 +352,9 @@ function createNode(x, y, label, type, inputs = [], outputs = [], id, source = '
|
|
352 |
padding: 5
|
353 |
});
|
354 |
|
355 |
-
codeWindow.add(codeBox);
|
356 |
-
|
357 |
-
|
358 |
|
359 |
// Create textarea for editing
|
360 |
codeTextarea = document.createElement('textarea');
|
@@ -362,8 +362,8 @@ function createNode(x, y, label, type, inputs = [], outputs = [], id, source = '
|
|
362 |
const canvasRect = stage.container().getBoundingClientRect();
|
363 |
const textareaX = (nodePos.x + stage.x()) / scale + canvasRect.left;
|
364 |
const textareaY = (nodePos.y + height + 10 + stage.y()) / scale + canvasRect.top;
|
365 |
-
codeTextarea.style.left = `${textareaX}px`;
|
366 |
-
codeTextarea.style.top = `${textareaY}px`;
|
367 |
codeTextarea.style.width = `${300 / scale}px`;
|
368 |
codeTextarea.style.height = `${100 / scale}px`;
|
369 |
codeTextarea.style.fontFamily = 'monospace';
|
|
|
352 |
padding: 5
|
353 |
});
|
354 |
|
355 |
+
//codeWindow.add(codeBox);
|
356 |
+
// codeWindow.add(codeText);
|
357 |
+
// layer.add(codeWindow);
|
358 |
|
359 |
// Create textarea for editing
|
360 |
codeTextarea = document.createElement('textarea');
|
|
|
362 |
const canvasRect = stage.container().getBoundingClientRect();
|
363 |
const textareaX = (nodePos.x + stage.x()) / scale + canvasRect.left;
|
364 |
const textareaY = (nodePos.y + height + 10 + stage.y()) / scale + canvasRect.top;
|
365 |
+
//codeTextarea.style.left = `${textareaX}px`;
|
366 |
+
//codeTextarea.style.top = `${textareaY}px`;
|
367 |
codeTextarea.style.width = `${300 / scale}px`;
|
368 |
codeTextarea.style.height = `${100 / scale}px`;
|
369 |
codeTextarea.style.fontFamily = 'monospace';
|