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
25e656fa
Commit
25e656fa
authored
Jan 15, 2019
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
panel resize
parent
72120cdf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
16 deletions
+11
-16
app.js
src/app.js
+5
-11
panels-resize.js
src/lib/panels-resize.js
+6
-5
No files found.
src/app.js
View file @
25e656fa
...
...
@@ -191,7 +191,7 @@ class App {
self
.
_view
.
swappanel
.
style
.
left
=
self
.
_view
.
iconpanel
.
clientWidth
+
'px'
self
.
_view
.
mainpanel
.
style
.
left
=
(
self
.
_view
.
iconpanel
.
clientWidth
+
self
.
_view
.
swappanel
.
clientWidth
)
+
'px'
let
resizeFeature
=
new
PanelsResize
(
'#swap-panel'
,
'#editor-container'
,
{
'minWidth'
:
'300'
})
let
resizeFeature
=
new
PanelsResize
(
'#swap-panel'
,
'#editor-container'
,
{
'minWidth'
:
300
})
run
.
apply
(
self
)
}
...
...
@@ -412,7 +412,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
// ----------------- editor panel ----------------------
self
.
_components
.
editorpanel
=
new
EditorPanel
()
registry
.
put
({
api
:
self
.
_components
.
editorpanel
,
name
:
'editorpanel'
})
// ----------------- Renderer -----------------
var
renderer
=
new
Renderer
()
registry
.
put
({
api
:
renderer
,
name
:
'renderer'
})
...
...
@@ -429,7 +429,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
// TODOs those are instanciated before hand. should be instanciated on demand
const
pluginManagerComponent
=
new
PluginManagerComponent
()
let
appStore
=
new
EntityStore
(
'module'
,
{
actives
:
[],
ids
:
[],
entities
:
{}
})
const
appManager
=
new
RemixAppManager
(
appStore
)
registry
.
put
({
api
:
appManager
.
proxy
(),
name
:
'pluginmanager'
})
...
...
@@ -467,21 +466,16 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
{
profile
:
pluginManagerComponent
.
profile
(),
api
:
pluginManagerComponent
}])
const
swapPanelComponent
=
new
SwapPanelComponent
()
const
verticalIconComponent
=
new
VerticalIconsComponent
()
const
swapPanelApi
=
new
SwapPanelApi
(
swapPanelComponent
,
verticalIconComponent
,
appManager
)
const
verticalIconsApi
=
new
VerticalIconsApi
(
verticalIconComponent
,
appManager
)
self
.
_components
.
editorpanel
.
init
()
self
.
_components
.
fileManager
.
init
()
let
mainEl
=
self
.
_components
.
editorpanel
.
render
()
self
.
_view
.
mainpanel
.
appendChild
(
mainEl
)
self
.
_view
.
mainpanel
.
appendChild
(
self
.
_components
.
editorpanel
.
render
())
self
.
_view
.
iconpanel
.
appendChild
(
verticalIconComponent
.
render
())
let
swapEl
=
swapPanelComponent
.
render
()
self
.
_view
.
swappanel
.
appendChild
(
swapEl
)
self
.
_view
.
swappanel
.
appendChild
(
swapPanelComponent
.
render
())
appManager
.
activateOne
(
'App'
)
appManager
.
activateOne
(
'Udapp'
)
...
...
src/lib/panels-resize.js
View file @
25e656fa
...
...
@@ -54,8 +54,8 @@ export default class PanelsResize {
}
let
moveGhostbar
=
(
event
)
=>
{
// @NOTE VERTICAL ghostbar
let
p
=
process
Width
(
event
)
if
(
p
.
panel1Width
<
opt
.
minWidth
||
p
.
panel2Width
<
opt
.
minWidth
)
return
let
p
=
process
Positiions
(
event
)
if
(
p
.
panel1Width
<
=
opt
.
minWidth
||
p
.
panel2Width
<=
opt
.
minWidth
)
return
ghostbar
.
style
.
left
=
event
.
x
+
'px'
}
...
...
@@ -64,17 +64,18 @@ export default class PanelsResize {
document
.
removeEventListener
(
'mousemove'
,
moveGhostbar
)
document
.
removeEventListener
(
'mouseup'
,
removeGhostbar
)
document
.
removeEventListener
(
'keydown'
,
cancelGhostbar
)
let
p
=
processWidth
(
event
)
if
(
p
.
panel1Width
<
opt
.
minWidth
||
p
.
panel2Width
<
opt
.
minWidth
)
return
let
p
=
processPositiions
(
event
)
panel1
.
style
.
width
=
p
.
panel1Width
+
'px'
panel2
.
style
.
left
=
p
.
panel2left
+
'px'
panel2
.
style
.
width
=
p
.
panel2Width
+
'px'
}
let
process
Width
=
(
event
)
=>
{
let
process
Positiions
=
(
event
)
=>
{
let
panel1Width
=
event
.
x
-
panel1
.
offsetLeft
panel1Width
=
panel1Width
<
opt
.
minWidth
?
opt
.
minWidth
:
panel1Width
let
panel2left
=
panel1
.
offsetLeft
+
panel1Width
let
panel2Width
=
panel2
.
parentElement
.
clientWidth
-
panel1
.
offsetLeft
-
panel1Width
panel2Width
=
panel2Width
<
opt
.
minWidth
?
opt
.
minWidth
:
panel2Width
return
{
panel1Width
,
panel2left
,
panel2Width
}
}
...
...
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