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
ad248553
Commit
ad248553
authored
Aug 19, 2019
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
standard
parent
3f8c557e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
panels-resize.js
src/lib/panels-resize.js
+3
-3
No files found.
src/lib/panels-resize.js
View file @
ad248553
...
...
@@ -23,7 +23,7 @@ const css = csjs`
export
default
class
PanelsResize
{
constructor
(
panel
)
{
this
.
panel
=
panel
let
self
=
this
;
let
self
=
this
const
string
=
panel
.
style
.
minWidth
this
.
minWidth
=
string
.
length
>
2
?
parseInt
(
string
.
substring
(
0
,
string
.
length
-
2
))
:
0
window
.
addEventListener
(
'resize'
,
function
(
event
)
{
...
...
@@ -44,7 +44,7 @@ export default class PanelsResize {
document
.
addEventListener
(
'keydown'
,
cancelGhostbar
)
}
}
let
cancelGhostbar
=
(
event
)
=>
{
if
(
event
.
keyCode
===
27
)
{
document
.
body
.
removeChild
(
this
.
ghostbar
)
...
...
@@ -76,7 +76,7 @@ export default class PanelsResize {
setPosition
(
event
)
{
let
panelWidth
=
this
.
calculatePanelWidth
(
event
)
// close the panel if the width is less than a minWidth
if
(
panelWidth
>
this
.
minWidth
-
10
||
this
.
panel
.
style
.
display
==
'none'
)
{
if
(
panelWidth
>
this
.
minWidth
-
10
||
this
.
panel
.
style
.
display
==
=
'none'
)
{
this
.
panel
.
style
.
width
=
panelWidth
+
'px'
this
.
showPanel
()
}
else
this
.
hidePanel
()
...
...
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