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
08a2c249
Commit
08a2c249
authored
Jul 18, 2017
by
yann300
Committed by
GitHub
Jul 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #627 from serapath-contribution/master
REFACTOR (2) change layout of app container
parents
2f6b70a9
0bce0b96
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
30 deletions
+32
-30
browser-solidity.css
assets/css/browser-solidity.css
+0
-15
app.js
src/app.js
+17
-5
editor.js
src/app/editor.js
+10
-1
righthand-panel.js
src/app/righthand-panel.js
+5
-9
No files found.
assets/css/browser-solidity.css
View file @
08a2c249
...
...
@@ -8,15 +8,6 @@ body {
font-weight
:
normal
;
}
#editor
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
auto
;
bottom
:
0
;
right
:
37em
;
}
.scroller
{
position
:
absolute
;
z-index
:
999
;
...
...
@@ -428,12 +419,6 @@ body {
border-right
:
2px
solid
hsla
(
215
,
81%
,
79%
,
.3
);
}
#editor
.ace-tm
.ace_gutter
,
#editor
.ace-tm
.ace_gutter-active-line
,
#editor
.ace-tm
.ace_marker-layer
.ace_active-line
{
background-color
:
rgba
(
225
,
229
,
251
,
0.5
);
}
input
[
readonly
]
{
display
:
block
;
width
:
100%
;
...
...
src/app.js
View file @
08a2c249
...
...
@@ -30,6 +30,14 @@ var RighthandPanel = require('./app/righthand-panel')
var
examples
=
require
(
'./app/example-contracts'
)
var
css
=
csjs
`
.browsersolidity {
position : absolute;
top : 0;
left : 0;
width : auto;
bottom : 0;
right : 37em;
}
.editor-container {
display : flex;
position : absolute;
...
...
@@ -58,8 +66,8 @@ class App {
var
self
=
this
if
(
self
.
_view
.
el
)
return
self
.
_view
.
el
/***************************************************************************/
var
el
=
yo
`
<div
id="editor"
>
self
.
_view
.
el
=
yo
`
<div
class=
${
css
.
browsersolidity
}
>
<div id="tabs-bar">
<div class="scroller scroller-left"><i class="fa fa-chevron-left "></i></div>
<div class="scroller scroller-right"><i class="fa fa-chevron-right "></i></div>
...
...
@@ -73,7 +81,7 @@ class App {
<div id="dragbar"></div>
</div>
`
return
el
return
self
.
_view
.
el
}
}
...
...
@@ -662,7 +670,11 @@ function run () {
// ---------------- Righthand-panel --------------------
var
rhpAPI
=
{
config
:
config
,
onResize
:
onResize
,
setEditorSize
(
delta
)
{
$
(
'#righthand-panel'
).
css
(
'width'
,
delta
)
self
.
_view
.
el
.
style
.
right
=
delta
+
'px'
onResize
()
},
reAdjust
:
reAdjust
,
warnCompilerLoading
:
(
msg
)
=>
{
renderer
.
clear
()
...
...
@@ -692,7 +704,7 @@ function run () {
window
.
onresize
=
onResize
onResize
()
document
.
querySelector
(
'#editor'
)
.
addEventListener
(
'change'
,
onResize
)
self
.
_view
.
el
.
addEventListener
(
'change'
,
onResize
)
document
.
querySelector
(
'#editorWrap'
).
addEventListener
(
'change'
,
onResize
)
// ----------------- compiler ----------------------
...
...
src/app/editor.js
View file @
08a2c249
'use strict'
var
EventManager
=
require
(
'ethereum-remix'
).
lib
.
EventManager
var
yo
=
require
(
'yo-yo'
)
var
csjs
=
require
(
'csjs-inject'
)
var
ace
=
require
(
'brace'
)
var
Range
=
ace
.
acequire
(
'ace/range'
).
Range
...
...
@@ -14,6 +14,15 @@ var css = csjs`
width : 100%;
}
`
document
.
head
.
appendChild
(
yo
`
<style>
.ace-tm .ace_gutter,
.ace-tm .ace_gutter-active-line,
.ace-tm .ace_marker-layer .ace_active-line {
background-color: rgba(225, 229, 251, 0.5);
}
</style>
`
)
function
Editor
(
editorElement
)
{
var
editor
=
ace
.
edit
(
editorElement
)
...
...
src/app/righthand-panel.js
View file @
08a2c249
...
...
@@ -28,6 +28,8 @@ var css = csjs`
module
.
exports
=
RighthandPanel
function
RighthandPanel
(
container
,
appAPI
,
events
,
opts
)
{
var
self
=
this
self
.
_api
=
appAPI
var
optionViews
=
yo
`<div id="optionViews" class="settingsView"></div>`
var
element
=
yo
`
<div id="righthand-panel">
...
...
@@ -61,7 +63,7 @@ function RighthandPanel (container, appAPI, events, opts) {
var
hidingRHP
=
false
$
(
'.toggleRHP'
).
click
(
function
()
{
hidingRHP
=
!
hidingRHP
setEditorSize
(
hidingRHP
?
0
:
appAPI
.
config
.
get
(
EDITOR_WINDOW_SIZE
))
se
lf
.
_api
.
se
tEditorSize
(
hidingRHP
?
0
:
appAPI
.
config
.
get
(
EDITOR_WINDOW_SIZE
))
$
(
'.toggleRHP i'
).
toggleClass
(
'fa-angle-double-right'
,
!
hidingRHP
)
$
(
'.toggleRHP i'
).
toggleClass
(
'fa-angle-double-left'
,
hidingRHP
)
})
...
...
@@ -98,12 +100,6 @@ function RighthandPanel (container, appAPI, events, opts) {
var
$body
=
$
(
'body'
)
function
setEditorSize
(
delta
)
{
$
(
'#righthand-panel'
).
css
(
'width'
,
delta
)
$
(
'#editor'
).
css
(
'right'
,
delta
)
appAPI
.
onResize
()
}
function
getEditorSize
()
{
return
$
(
'#righthand-panel'
).
width
()
}
...
...
@@ -115,14 +111,14 @@ function RighthandPanel (container, appAPI, events, opts) {
$
(
document
).
unbind
(
'mousemove'
)
dragging
=
false
delta
=
(
delta
<
50
)
?
50
:
delta
setEditorSize
(
delta
)
se
lf
.
_api
.
se
tEditorSize
(
delta
)
appAPI
.
config
.
set
(
EDITOR_WINDOW_SIZE
,
delta
)
appAPI
.
reAdjust
()
}
})
if
(
appAPI
.
config
.
exists
(
EDITOR_WINDOW_SIZE
))
{
setEditorSize
(
appAPI
.
config
.
get
(
EDITOR_WINDOW_SIZE
))
se
lf
.
_api
.
se
tEditorSize
(
appAPI
.
config
.
get
(
EDITOR_WINDOW_SIZE
))
}
else
{
appAPI
.
config
.
set
(
EDITOR_WINDOW_SIZE
,
getEditorSize
())
}
...
...
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