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
57e57bb5
Commit
57e57bb5
authored
Feb 28, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dist
parent
fb2f1551
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
8 deletions
+29
-8
dev.js
dist/dev.js
+29
-8
No files found.
dist/dev.js
View file @
57e57bb5
...
@@ -533,7 +533,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
...
@@ -533,7 +533,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
node
.
parent
.
removeChild
(
node
);
node
.
parent
.
removeChild
(
node
);
}
}
node
.
parent
=
this
;
node
.
parent
=
this
;
node
.
root
=
parent
.
root
;
node
.
root
=
node
.
parent
.
root
;
this
.
children
.
splice
(
index
,
0
,
node
);
this
.
children
.
splice
(
index
,
0
,
node
);
},
},
...
@@ -3204,9 +3204,11 @@ KityMinder.registerModule( "LayoutBottom", function () {
...
@@ -3204,9 +3204,11 @@ KityMinder.registerModule( "LayoutBottom", function () {
Layout
.
connect
=
null
;
Layout
.
connect
=
null
;
Layout
.
shicon
=
null
;
Layout
.
shicon
=
null
;
}
else
{
}
else
{
_buffer
[
0
].
getRenderContainer
().
remove
();
try
{
Layout
.
connect
.
remove
();
_buffer
[
0
].
getRenderContainer
().
remove
();
if
(
Layout
.
shicon
)
Layout
.
shicon
.
remove
();
Layout
.
connect
.
remove
();
if
(
Layout
.
shicon
)
Layout
.
shicon
.
remove
();
}
catch
(
error
)
{}
}
}
_buffer
=
_buffer
.
concat
(
_buffer
[
0
].
getChildren
()
);
_buffer
=
_buffer
.
concat
(
_buffer
[
0
].
getChildren
()
);
_buffer
.
shift
();
_buffer
.
shift
();
...
@@ -3355,6 +3357,9 @@ var ViewDragger = kity.createClass( "ViewDragger", {
...
@@ -3355,6 +3357,9 @@ var ViewDragger = kity.createClass( "ViewDragger", {
paper
.
setStyle
(
'cursor'
,
value
?
'-webkit-grab'
:
'default'
);
paper
.
setStyle
(
'cursor'
,
value
?
'-webkit-grab'
:
'default'
);
this
.
_enabled
=
value
;
this
.
_enabled
=
value
;
},
},
move
:
function
(
offset
)
{
this
.
_minder
.
getRenderContainer
().
translate
(
offset
.
x
,
offset
.
y
);
},
_bind
:
function
()
{
_bind
:
function
()
{
var
dragger
=
this
,
var
dragger
=
this
,
...
@@ -3371,7 +3376,7 @@ var ViewDragger = kity.createClass( "ViewDragger", {
...
@@ -3371,7 +3376,7 @@ var ViewDragger = kity.createClass( "ViewDragger", {
}
}
// 点击未选中的根节点临时开启
// 点击未选中的根节点临时开启
else
if
(
e
.
getTargetNode
()
==
this
.
getRoot
()
&&
else
if
(
e
.
getTargetNode
()
==
this
.
getRoot
()
&&
(
!
this
.
getRoot
().
isSelected
()
||
!
this
.
isSingleSelect
())
)
{
(
!
this
.
getRoot
().
isSelected
()
||
!
this
.
isSingleSelect
()
)
)
{
lastPosition
=
e
.
getPosition
();
lastPosition
=
e
.
getPosition
();
dragger
.
setEnabled
(
true
);
dragger
.
setEnabled
(
true
);
isRootDrag
=
true
;
isRootDrag
=
true
;
...
@@ -3385,8 +3390,7 @@ var ViewDragger = kity.createClass( "ViewDragger", {
...
@@ -3385,8 +3390,7 @@ var ViewDragger = kity.createClass( "ViewDragger", {
// 当前偏移加上历史偏移
// 当前偏移加上历史偏移
var
offset
=
kity
.
Vector
.
fromPoints
(
lastPosition
,
currentPosition
);
var
offset
=
kity
.
Vector
.
fromPoints
(
lastPosition
,
currentPosition
);
dragger
.
move
(
offset
);
this
.
getRenderContainer
().
translate
(
offset
.
x
,
offset
.
y
);
e
.
stopPropagation
();
e
.
stopPropagation
();
lastPosition
=
currentPosition
;
lastPosition
=
currentPosition
;
}
}
...
@@ -3428,6 +3432,23 @@ KityMinder.registerModule( 'Hand', function () {
...
@@ -3428,6 +3432,23 @@ KityMinder.registerModule( 'Hand', function () {
this
.
execCommand
(
'hand'
);
this
.
execCommand
(
'hand'
);
e
.
preventDefault
();
e
.
preventDefault
();
}
}
},
mousewheel
:
function
(
e
)
{
var
dx
=
e
.
originEvent
.
wheelDeltaX
||
e
.
originEvent
.
wheelDelta
,
dy
=
e
.
originEvent
.
wheelDeltaY
||
0
;
this
.
_viewDragger
.
move
(
{
x
:
dx
/
2.5
,
y
:
dy
/
2.5
}
);
e
.
originEvent
.
preventDefault
();
},
dblclick
:
function
()
{
var
viewport
=
this
.
getPaper
().
getViewPort
();
var
offset
=
this
.
getRoot
().
getRenderContainer
(
this
.
getRenderContainer
()).
getTransform
().
getTranslate
();
var
dx
=
viewport
.
center
.
x
-
offset
.
x
,
dy
=
viewport
.
center
.
y
-
offset
.
y
;
this
.
getRenderContainer
().
fxTranslate
(
dx
,
dy
,
300
);
}
}
}
}
};
};
...
@@ -4528,7 +4549,7 @@ Minder.Receiver = kity.createClass('Receiver',{
...
@@ -4528,7 +4549,7 @@ Minder.Receiver = kity.createClass('Receiver',{
return
;
return
;
}
}
var
text
=
(
this
.
container
.
textContent
||
this
.
container
.
innerText
)
.
replace
(
/
\u
200b/g
,
''
);
var
text
=
this
.
container
.
textContent
.
replace
(
/
\u
200b/g
,
''
);
if
(
this
.
textShape
.
getOpacity
()
==
0
){
if
(
this
.
textShape
.
getOpacity
()
==
0
){
this
.
textShape
.
setOpacity
(
1
);
this
.
textShape
.
setOpacity
(
1
);
...
...
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