Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jsexplain
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Verified Software
jsexplain
Commits
4fc4edc2
Commit
4fc4edc2
authored
9 years ago
by
charguer
Committed by
Thomas Wood
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
view
parent
be3f8513
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
driver.html
+1
-1
1 addition, 1 deletion
driver.html
navig-driver.js
+23
-3
23 additions, 3 deletions
navig-driver.js
with
24 additions
and
4 deletions
driver.html
+
1
−
1
View file @
4fc4edc2
...
...
@@ -100,7 +100,7 @@
<textarea
id=
'source_code'
class=
'source'
rows=
'6'
cols=
'60'
>
source code here
</textarea>
</td>
<td
width=
'600'
>
<div
class=
"scroll-pane"
style=
"height: 1
0
em"
>
<div
id=
'disp_env_pane'
class=
"scroll-pane"
style=
"height: 1
5
em"
>
<div
id=
'disp_env'
>
ctx here
</div>
</div>
</td>
...
...
This diff is collapsed.
Click to expand it.
navig-driver.js
+
23
−
3
View file @
4fc4edc2
...
...
@@ -80,9 +80,9 @@ var source_file = '{}';
var
source_file
=
'
{} + {}
'
;
var
source_file
=
'
var x = { a : 1, b : 2 };
'
;
var
source_file
=
'
x = 1;
\n
x = 2;
\n
x = 3
'
;
var
source_file
=
'
(function (x) {return 1;})()
'
;
var
source_file
=
'
var x = { a : 1 };
\n
x.b = 2;
\n
x
'
;
var
source_file
=
'
var x = { a : { c: 1 } };
\n
x.a.b = 2;
\n
x
'
;
var
source_file
=
'
(function (x) {
\n
return 1;
\n
})()
'
;
// --------------- Initialization ----------------
...
...
@@ -580,7 +580,7 @@ function show_lexical_env(state, lexical_env, target) {
var
provide_this
=
env_record
.
provide_this
;
var
obj_target
=
fresh_id
();
t
.
append
(
"
with (
"
+
((
provide_this
)
?
""
:
"
not
"
)
+
"
providing 'this'): <div id='
"
+
obj_target
+
"
'></div>
"
);
show_object
(
state
,
object_loc
,
obj_target
,
0
);
show_object
(
state
,
object_loc
,
obj_target
,
1
);
break
;
default
:
...
...
@@ -891,7 +891,7 @@ source = CodeMirror.fromTextArea(document.getElementById('source_code'), {
lineNumbers
:
true
,
lineWrapping
:
true
});
source
.
setSize
(
3
00
,
150
);
source
.
setSize
(
5
00
,
150
);
interpreter
=
CodeMirror
.
fromTextArea
(
document
.
getElementById
(
'
interpreter_code
'
),
{
mode
:
'
js
'
,
...
...
@@ -914,6 +914,7 @@ interpreter = CodeMirror.fromTextArea(document.getElementById('interpreter_code'
});
interpreter
.
setSize
(
800
,
400
);
/* ==> try in new version of codemirror*/
try
{
$
(
interpreter
.
getWrapperElement
()).
resizable
({
...
...
@@ -922,6 +923,25 @@ try {
}
});
}
catch
(
e
)
{
}
// TODO: factorize code below with the above
try
{
$
(
source
.
getWrapperElement
()).
resizable
({
resize
:
function
()
{
source
.
setSize
(
$
(
this
).
width
(),
$
(
this
).
height
());
}
});
}
catch
(
e
)
{
}
try
{
$
(
"
disp_env_pane
"
).
resizable
({
resize
:
function
()
{
disp_env_pane
.
setSize
(
$
(
this
).
width
(),
$
(
this
).
height
());
}
});
}
catch
(
e
)
{
}
interpreter
.
on
(
'
dblclick
'
,
function
()
{
var
line
=
interpreter
.
getCursor
().
line
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment