Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
954d8602
Commit
954d8602
authored
Aug 01, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resize plugins panel.
parent
8501cf59
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
apps/common/main/lib/component/Layout.js
apps/common/main/lib/component/Layout.js
+7
-0
apps/common/main/lib/controller/Plugins.js
apps/common/main/lib/controller/Plugins.js
+23
-0
No files found.
apps/common/main/lib/component/Layout.js
View file @
954d8602
...
...
@@ -172,6 +172,11 @@ define([
},
this
);
this
.
freeze
=
options
.
freeze
;
this
.
freeze
&&
this
.
freezePanels
(
this
.
freeze
);
Common
.
NotificationCenter
.
on
({
'
frame:mouseMove
'
:
this
.
resize
.
eventMove
,
'
frame:mouseup
'
:
this
.
resize
.
eventStop
});
},
doLayout
:
function
()
{
...
...
@@ -251,6 +256,7 @@ define([
this
.
resize
.
max
=
(
panel
.
maxpos
>
0
?
panel
.
maxpos
:
this
.
resize
.
$el
.
parent
().
height
()
+
panel
.
maxpos
)
-
this
.
resize
.
width
;
this
.
resize
.
initx
=
e
.
pageX
-
parseInt
(
e
.
currentTarget
.
style
.
left
);
}
Common
.
NotificationCenter
.
trigger
(
'
layout:resizestart
'
);
},
resizeMove
:
function
(
e
)
{
...
...
@@ -331,6 +337,7 @@ define([
this
.
doLayout
();
this
.
trigger
(
'
layout:resizedrag
'
,
this
);
}
Common
.
NotificationCenter
.
trigger
(
'
layout:resizestop
'
);
},
freezePanels
:
function
(
value
)
{
...
...
apps/common/main/lib/controller/Plugins.js
View file @
954d8602
...
...
@@ -74,6 +74,8 @@ define([
this
.
api
.
asc_registerCallback
(
"
asc_onPluginShow
"
,
_
.
bind
(
this
.
onPluginShow
,
this
));
this
.
api
.
asc_registerCallback
(
"
asc_onPluginClose
"
,
_
.
bind
(
this
.
onPluginClose
,
this
));
this
.
api
.
asc_registerCallback
(
"
asc_onPluginResize
"
,
_
.
bind
(
this
.
onPluginResize
,
this
));
this
.
api
.
asc_registerCallback
(
"
asc_onPluginMouseUp
"
,
_
.
bind
(
this
.
onPluginMouseUp
,
this
));
this
.
api
.
asc_registerCallback
(
"
asc_onPluginMouseMove
"
,
_
.
bind
(
this
.
onPluginMouseMove
,
this
));
return
this
;
},
...
...
@@ -88,6 +90,19 @@ define([
onAfterRender
:
function
(
panelPlugins
)
{
panelPlugins
.
viewPluginsList
.
on
(
'
item:click
'
,
_
.
bind
(
this
.
onSelectPlugin
,
this
));
this
.
bindViewEvents
(
this
.
panelPlugins
,
this
.
events
);
var
me
=
this
;
Common
.
NotificationCenter
.
on
({
'
layout:resizestart
'
:
function
(
e
){
if
(
me
.
panelPlugins
.
isVisible
())
{
me
.
api
.
asc_pluginEnableMouseEvents
(
true
);
}
},
'
layout:resizestop
'
:
function
(
e
){
if
(
me
.
panelPlugins
.
isVisible
())
{
me
.
api
.
asc_pluginEnableMouseEvents
(
false
);
}
}
});
},
updatePluginsList
:
function
()
{
...
...
@@ -249,6 +264,14 @@ define([
onToolClose
:
function
()
{
this
.
api
.
asc_pluginButtonClick
(
-
1
);
},
onPluginMouseUp
:
function
(
e
)
{
Common
.
NotificationCenter
.
trigger
(
'
frame:mouseup
'
,
e
);
},
onPluginMouseMove
:
function
(
e
)
{
Common
.
NotificationCenter
.
trigger
(
'
frame:mousemove
'
,
e
);
}
},
Common
.
Controllers
.
Plugins
||
{}));
...
...
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