Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
4c786e8b
Commit
4c786e8b
authored
Aug 31, 2015
by
d11e9
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow editor/output resize
parent
40cea741
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
1 deletion
+60
-1
index.html
index.html
+60
-1
No files found.
index.html
View file @
4c786e8b
...
...
@@ -42,9 +42,10 @@ body {
#output
{
border-top
:
1px
solid
#ccc
;
background-color
:
white
;
position
:
absolute
;
top
:
18em
;
width
:
32em
;
left
:
0
;
right
:
0
;
bottom
:
0px
;
}
...
...
@@ -141,6 +142,28 @@ body {
border
:
0
none
;
}
#ghostbar
{
width
:
1px
;
background-color
:
red
;
opacity
:
0.5
;
position
:
absolute
;
cursor
:
col-resize
;
z-index
:
9999
;
top
:
0
;
bottom
:
0
;
}
#dragbar
{
background-color
:
transparent
;
position
:
absolute
;
width
:
5px
;
left
:
0
;
top
:
0
;
bottom
:
0
;
cursor
:
col-resize
;
z-index
:
999
;
}
</style>
<script
src=
"libs/jquery-2.1.3.min.js"
></script>
<script
src=
"libs/ace.js"
></script>
...
...
@@ -220,6 +243,7 @@ body {
</div>
<div
id=
"righthand-panel"
>
<div
id=
"dragbar"
></div>
<div
id=
"header"
>
<img
id=
"solIcon"
src=
"solidity.svg"
>
<h1>
Solidity realtime
<br/>
compiler and runtime
</h1>
...
...
@@ -237,6 +261,41 @@ body {
</div>
<script>
// ----------------- resizeable ui ---------------
var
dragging
=
false
;
$
(
'#dragbar'
).
mousedown
(
function
(
e
){
e
.
preventDefault
();
dragging
=
true
;
var
main
=
$
(
'#righthand-panel'
);
var
ghostbar
=
$
(
'<div id="ghostbar">'
,
{
css
:
{
top
:
main
.
offset
().
top
,
left
:
main
.
offset
().
left
}
}).
prependTo
(
'body'
);
$
(
document
).
mousemove
(
function
(
e
){
ghostbar
.
css
(
"left"
,
e
.
pageX
+
2
);
});
});
var
$body
=
$
(
'body'
);
$
(
document
).
mouseup
(
function
(
e
){
if
(
dragging
)
{
var
delta
=
$body
.
width
()
-
e
.
pageX
+
2
;
$
(
'#righthand-panel'
).
css
(
"width"
,
delta
);
$
(
'#editor'
).
css
(
"right"
,
delta
);
$
(
'#ghostbar'
).
remove
();
$
(
document
).
unbind
(
'mousemove'
);
dragging
=
false
;
}
});
// ----------------- editor ----------------------
var
editor
=
ace
.
edit
(
"input"
);
editor
.
getSession
().
setMode
(
"ace/mode/javascript"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment