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
333bdd6a
Commit
333bdd6a
authored
Mar 07, 2014
by
techird
Browse files
Options
Browse Files
Download
Plain Diff
dist
parents
a94e768a
3727100e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
14 deletions
+33
-14
kityminder.all.js
dist/kityminder.all.js
+3
-1
kityminder.all.min.js
dist/kityminder.all.min.js
+1
-1
kity
kity
+1
-1
hand.js
src/module/hand.js
+25
-10
png.js
src/protocal/png.js
+3
-1
No files found.
dist/kityminder.all.js
View file @
333bdd6a
...
@@ -7580,6 +7580,9 @@ KityMinder.registerProtocal( "png", function () {
...
@@ -7580,6 +7580,9 @@ KityMinder.registerProtocal( "png", function () {
renderContainer
.
translate
(
-
renderBox
.
x
,
-
renderBox
.
y
);
renderContainer
.
translate
(
-
renderBox
.
x
,
-
renderBox
.
y
);
svgXml
=
km
.
getPaper
().
container
.
innerHTML
;
svgXml
=
km
.
getPaper
().
container
.
innerHTML
;
renderContainer
.
translate
(
renderBox
.
x
,
renderBox
.
y
);
$svg
=
$
(
svgXml
);
$svg
=
$
(
svgXml
);
$svg
.
attr
(
{
$svg
.
attr
(
{
width
:
renderBox
.
width
,
width
:
renderBox
.
width
,
...
@@ -7627,7 +7630,6 @@ KityMinder.registerProtocal( "png", function () {
...
@@ -7627,7 +7630,6 @@ KityMinder.registerProtocal( "png", function () {
downloadUrl
=
generateDataUrl
(
canvas
);
downloadUrl
=
generateDataUrl
(
canvas
);
if
(
finishCallback
)
{
if
(
finishCallback
)
{
finishCallback
(
downloadUrl
);
finishCallback
(
downloadUrl
);
renderContainer
.
translate
(
renderBox
.
x
,
renderBox
.
y
);
}
}
}
);
}
);
}
);
}
);
...
...
dist/kityminder.all.min.js
View file @
333bdd6a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
kity
@
e144ccd9
Subproject commit
26f9836718affd92c95196be698b14b1c6da4a95
Subproject commit
e144ccd9270712497804915d13ec92f6593299b0
src/module/hand.js
View file @
333bdd6a
...
@@ -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"
);
}
}
}
}
};
};
...
...
src/protocal/png.js
View file @
333bdd6a
...
@@ -31,6 +31,9 @@ KityMinder.registerProtocal( "png", function () {
...
@@ -31,6 +31,9 @@ KityMinder.registerProtocal( "png", function () {
renderContainer
.
translate
(
-
renderBox
.
x
,
-
renderBox
.
y
);
renderContainer
.
translate
(
-
renderBox
.
x
,
-
renderBox
.
y
);
svgXml
=
km
.
getPaper
().
container
.
innerHTML
;
svgXml
=
km
.
getPaper
().
container
.
innerHTML
;
renderContainer
.
translate
(
renderBox
.
x
,
renderBox
.
y
);
$svg
=
$
(
svgXml
);
$svg
=
$
(
svgXml
);
$svg
.
attr
(
{
$svg
.
attr
(
{
width
:
renderBox
.
width
,
width
:
renderBox
.
width
,
...
@@ -78,7 +81,6 @@ KityMinder.registerProtocal( "png", function () {
...
@@ -78,7 +81,6 @@ KityMinder.registerProtocal( "png", function () {
downloadUrl
=
generateDataUrl
(
canvas
);
downloadUrl
=
generateDataUrl
(
canvas
);
if
(
finishCallback
)
{
if
(
finishCallback
)
{
finishCallback
(
downloadUrl
);
finishCallback
(
downloadUrl
);
renderContainer
.
translate
(
renderBox
.
x
,
renderBox
.
y
);
}
}
}
);
}
);
}
);
}
);
...
...
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