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
c1ac28bf
Commit
c1ac28bf
authored
8 years ago
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug resizing plugin left panel and moving plugin modal window.
parent
9403710f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
7 deletions
+29
-7
apps/common/main/lib/component/Layout.js
apps/common/main/lib/component/Layout.js
+12
-5
apps/common/main/lib/controller/Plugins.js
apps/common/main/lib/controller/Plugins.js
+17
-2
No files found.
apps/common/main/lib/component/Layout.js
View file @
c1ac28bf
...
@@ -172,11 +172,6 @@ define([
...
@@ -172,11 +172,6 @@ define([
},
this
);
},
this
);
this
.
freeze
=
options
.
freeze
;
this
.
freeze
&&
this
.
freezePanels
(
this
.
freeze
);
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
()
{
doLayout
:
function
()
{
...
@@ -236,6 +231,11 @@ define([
...
@@ -236,6 +231,11 @@ define([
mouseup
:
this
.
resize
.
eventStop
mouseup
:
this
.
resize
.
eventStop
});
});
Common
.
NotificationCenter
.
on
({
'
frame:mousemove
'
:
this
.
resize
.
eventMove
,
'
frame:mouseup
'
:
this
.
resize
.
eventStop
});
var
panel
=
e
.
data
.
panel
;
var
panel
=
e
.
data
.
panel
;
this
.
resize
.
type
=
e
.
data
.
type
;
this
.
resize
.
type
=
e
.
data
.
type
;
this
.
resize
.
$el
=
panel
.
el
;
this
.
resize
.
$el
=
panel
.
el
;
...
@@ -289,6 +289,13 @@ define([
...
@@ -289,6 +289,13 @@ define([
mouseup
:
this
.
resize
.
eventStop
mouseup
:
this
.
resize
.
eventStop
});
});
Common
.
NotificationCenter
.
off
({
'
frame:mousemove
'
:
this
.
resize
.
eventMove
,
'
frame:mouseup
'
:
this
.
resize
.
eventStop
});
if
(
!
this
.
resize
.
$el
)
return
;
if
(
this
.
resize
.
type
==
'
vertical
'
)
{
if
(
this
.
resize
.
type
==
'
vertical
'
)
{
var
prop
=
'
height
'
;
var
prop
=
'
height
'
;
var
value
=
e
.
pageY
-
this
.
resize
.
inity
;
var
value
=
e
.
pageY
-
this
.
resize
.
inity
;
...
...
This diff is collapsed.
Click to expand it.
apps/common/main/lib/controller/Plugins.js
View file @
c1ac28bf
...
@@ -66,6 +66,8 @@ define([
...
@@ -66,6 +66,8 @@ define([
storePlugins
:
this
.
getApplication
().
getCollection
(
'
Common.Collections.Plugins
'
)
storePlugins
:
this
.
getApplication
().
getCollection
(
'
Common.Collections.Plugins
'
)
});
});
this
.
panelPlugins
.
on
(
'
render:after
'
,
_
.
bind
(
this
.
onAfterRender
,
this
));
this
.
panelPlugins
.
on
(
'
render:after
'
,
_
.
bind
(
this
.
onAfterRender
,
this
));
this
.
_moveOffset
=
{
x
:
0
,
y
:
0
};
},
},
setApi
:
function
(
api
)
{
setApi
:
function
(
api
)
{
...
@@ -94,6 +96,9 @@ define([
...
@@ -94,6 +96,9 @@ define([
Common
.
NotificationCenter
.
on
({
Common
.
NotificationCenter
.
on
({
'
layout:resizestart
'
:
function
(
e
){
'
layout:resizestart
'
:
function
(
e
){
if
(
me
.
panelPlugins
.
isVisible
())
{
if
(
me
.
panelPlugins
.
isVisible
())
{
var
offset
=
me
.
panelPlugins
.
currentPluginFrame
.
offset
();
me
.
_moveOffset
=
{
x
:
offset
.
left
+
parseInt
(
me
.
panelPlugins
.
currentPluginFrame
.
css
(
'
padding-left
'
)),
y
:
offset
.
top
+
parseInt
(
me
.
panelPlugins
.
currentPluginFrame
.
css
(
'
padding-top
'
))};
me
.
api
.
asc_pluginEnableMouseEvents
(
true
);
me
.
api
.
asc_pluginEnableMouseEvents
(
true
);
}
}
},
},
...
@@ -235,8 +240,11 @@ define([
...
@@ -235,8 +240,11 @@ define([
});
});
me
.
pluginDlg
.
on
(
'
render:after
'
,
function
(
obj
){
me
.
pluginDlg
.
on
(
'
render:after
'
,
function
(
obj
){
obj
.
getChild
(
'
.footer .dlg-btn
'
).
on
(
'
click
'
,
_
.
bind
(
me
.
onDlgBtnClick
,
me
));
obj
.
getChild
(
'
.footer .dlg-btn
'
).
on
(
'
click
'
,
_
.
bind
(
me
.
onDlgBtnClick
,
me
));
me
.
pluginContainer
=
me
.
pluginDlg
.
$window
.
find
(
'
#id-plugin-container
'
);
}).
on
(
'
close
'
,
function
(
obj
){
}).
on
(
'
close
'
,
function
(
obj
){
me
.
pluginDlg
=
undefined
;
me
.
pluginDlg
=
undefined
;
}).
on
(
'
drag
'
,
function
(
args
){
me
.
api
.
asc_pluginEnableMouseEvents
(
args
[
1
]
==
'
start
'
);
});
});
me
.
pluginDlg
.
show
();
me
.
pluginDlg
.
show
();
}
}
...
@@ -267,11 +275,18 @@ define([
...
@@ -267,11 +275,18 @@ define([
},
},
onPluginMouseUp
:
function
(
x
,
y
)
{
onPluginMouseUp
:
function
(
x
,
y
)
{
Common
.
NotificationCenter
.
trigger
(
'
frame:mouseup
'
,
jQuery
.
Event
(
"
mouseup
"
,
{
pageX
:
x
,
pageY
:
y
}
));
if
(
this
.
pluginDlg
)
{
this
.
pluginDlg
.
binding
.
dragStop
();
}
else
Common
.
NotificationCenter
.
trigger
(
'
frame:mouseup
'
,
jQuery
.
Event
(
"
mouseup
"
,
{
pageX
:
x
+
this
.
_moveOffset
.
x
,
pageY
:
y
+
this
.
_moveOffset
.
y
}
));
},
},
onPluginMouseMove
:
function
(
x
,
y
)
{
onPluginMouseMove
:
function
(
x
,
y
)
{
Common
.
NotificationCenter
.
trigger
(
'
frame:mousemove
'
,
jQuery
.
Event
(
"
mousemove
"
,
{
pageX
:
x
,
pageY
:
y
}
));
if
(
this
.
pluginDlg
)
{
var
offset
=
this
.
pluginContainer
.
offset
();
this
.
pluginDlg
.
binding
.
drag
(
jQuery
.
Event
(
"
mousemove
"
,
{
pageX
:
x
+
offset
.
left
,
pageY
:
y
+
offset
.
top
}
));
}
else
Common
.
NotificationCenter
.
trigger
(
'
frame:mousemove
'
,
jQuery
.
Event
(
"
mousemove
"
,
{
pageX
:
x
+
this
.
_moveOffset
.
x
,
pageY
:
y
+
this
.
_moveOffset
.
y
}
));
}
}
},
Common
.
Controllers
.
Plugins
||
{}));
},
Common
.
Controllers
.
Plugins
||
{}));
...
...
This diff is collapsed.
Click to expand it.
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