mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 17:35:34 +00:00
feature(client) rm MousePosition
This commit is contained in:
parent
f27a3b7474
commit
a3e44763df
5 changed files with 15 additions and 22 deletions
|
|
@ -23,7 +23,6 @@ var Util, DOM, CloudFunc, join;
|
|||
|
||||
this.log = log,
|
||||
this.PREFIX = '',
|
||||
this.MousePosition = {};
|
||||
this.LIBDIR = '/lib/';
|
||||
this.LIBDIRCLIENT = '/lib/client/';
|
||||
this.MIN_ONE_PANEL_WIDTH = 1155;
|
||||
|
|
|
|||
|
|
@ -148,11 +148,15 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO, Format, edward;
|
|||
});
|
||||
}
|
||||
|
||||
function setMenu() {
|
||||
function setMenu(event) {
|
||||
var position = {
|
||||
x: event.clientX,
|
||||
y: event.clientY
|
||||
};
|
||||
|
||||
if (!Menu) {
|
||||
DOM.loadRemote('menu', function(error) {
|
||||
var position = CloudCmd.MousePosition,
|
||||
options = {
|
||||
var options = {
|
||||
beforeShow: function(params) {
|
||||
params.x -= 18;
|
||||
params.y -= 27;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ var Util, DOM, CloudFunc, CloudCmd;
|
|||
unload();
|
||||
pop();
|
||||
online();
|
||||
mousemove();
|
||||
};
|
||||
|
||||
this.initKeysPanel = function() {
|
||||
|
|
@ -106,17 +105,6 @@ var Util, DOM, CloudFunc, CloudCmd;
|
|||
}
|
||||
}
|
||||
|
||||
function mousemove() {
|
||||
DOM.Events.add('mousemove', function(event) {
|
||||
var position = CloudCmd.MousePosition,
|
||||
x = event.clientX,
|
||||
y = event.clientY;
|
||||
|
||||
position.x = x;
|
||||
position.y = y;
|
||||
});
|
||||
}
|
||||
|
||||
function execIfNotUL(callback, event) {
|
||||
var element = event.target,
|
||||
tag = element.tagName;
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO;
|
|||
Images = DOM.Images,
|
||||
MenuShowedName,
|
||||
MenuContext,
|
||||
MenuContextFile,
|
||||
Position = CloudCmd.MousePosition;
|
||||
MenuContextFile;
|
||||
|
||||
this.ENABLED = false;
|
||||
|
||||
|
|
@ -58,8 +57,8 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO;
|
|||
|
||||
function show(x, y) {
|
||||
if (!x || !y) {
|
||||
x = (position || Position).x;
|
||||
y = (position || Position).y;
|
||||
x = position.x;
|
||||
y = position.y;
|
||||
}
|
||||
|
||||
if (!Loading) {
|
||||
|
|
|
|||
|
|
@ -287,9 +287,12 @@ var CloudCmd, Util, DOM, CloudFunc, $;
|
|||
var isCurrent, isFiles, isFilesPassive,
|
||||
files = Info.files,
|
||||
filesPassive = Info.filesPassive,
|
||||
position = CloudCmd.MousePosition,
|
||||
element = event.target,
|
||||
isOverlay = element === overlay;
|
||||
isOverlay = element === overlay,
|
||||
position = {
|
||||
x: event.clientX,
|
||||
y: event.clientY
|
||||
};
|
||||
|
||||
if (isOverlay) {
|
||||
hideOverlay();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue