Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
3727100e
Commit
3727100e
authored
Mar 07, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
双击视野回到根节点
parent
9a7104c0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
11 deletions
+26
-11
kity
kity
+1
-1
hand.js
src/module/hand.js
+25
-10
No files found.
kity
@
e144ccd9
Subproject commit
26f9836718affd92c95196be698b14b1c6da4a95
Subproject commit
e144ccd9270712497804915d13ec92f6593299b0
src/module/hand.js
View file @
3727100e
...
@@ -35,9 +35,9 @@ var ViewDragger = kity.createClass( "ViewDragger", {
...
@@ -35,9 +35,9 @@ var ViewDragger = kity.createClass( "ViewDragger", {
dragger
.
setEnabled
(
true
);
dragger
.
setEnabled
(
true
);
isRootDrag
=
true
;
isRootDrag
=
true
;
var
me
=
this
;
var
me
=
this
;
setTimeout
(
function
()
{
setTimeout
(
function
()
{
me
.
setStatus
(
'hand'
);
me
.
setStatus
(
'hand'
);
},
1
);
},
1
);
}
}
}
);
}
);
...
@@ -111,21 +111,36 @@ KityMinder.registerModule( 'Hand', function () {
...
@@ -111,21 +111,36 @@ KityMinder.registerModule( 'Hand', function () {
}
}
},
},
mousewheel
:
function
(
e
)
{
mousewheel
:
function
(
e
)
{
var
dx
=
e
.
originEvent
.
wheelDeltaX
||
0
,
var
dx
,
dy
;
dy
=
e
.
originEvent
.
wheelDeltaY
||
e
.
originEvent
.
wheelDelta
;
e
=
e
.
originEvent
;
if
(
'wheelDeltaX'
in
e
)
{
dx
=
e
.
wheelDeltaX
||
0
;
dy
=
e
.
wheelDeltaY
||
0
;
}
else
{
dx
=
0
;
dy
=
e
.
wheelDelta
;
}
this
.
_viewDragger
.
move
(
{
this
.
_viewDragger
.
move
(
{
x
:
dx
/
2.5
,
x
:
dx
/
2.5
,
y
:
dy
/
2.5
y
:
dy
/
2.5
}
);
}
);
e
.
originEvent
.
preventDefault
();
e
.
preventDefault
();
},
},
dblclick
:
function
()
{
dblclick
:
function
(
e
)
{
if
(
e
.
getTargetNode
()
)
return
;
var
viewport
=
this
.
getPaper
().
getViewPort
();
var
viewport
=
this
.
getPaper
().
getViewPort
();
var
offset
=
this
.
getRoot
().
getRenderContainer
(
this
.
getRenderContainer
()
).
getTransform
().
getTranslate
(
);
var
offset
=
this
.
getRoot
().
getRenderContainer
(
).
getRenderBox
(
this
.
getRenderContainer
()
);
var
dx
=
viewport
.
center
.
x
-
offset
.
x
,
var
dx
=
viewport
.
center
.
x
-
offset
.
x
-
offset
.
width
/
2
,
dy
=
viewport
.
center
.
y
-
offset
.
y
;
dy
=
viewport
.
center
.
y
-
offset
.
y
;
//this.getRenderContainer().fxTranslate(dx, dy, 300
);
this
.
getRenderContainer
().
fxTranslate
(
dx
,
dy
,
1000
,
"easeOutQuint"
);
}
}
}
}
};
};
...
...
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