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
6a8d86c2
Commit
6a8d86c2
authored
Sep 23, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compalitity && navigator bug fix
parent
7a40b781
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
45 additions
and
31 deletions
+45
-31
import.js
import.js
+2
-1
fio
lib/fio
+1
-1
kity
lib/kity
+1
-1
mind.js
src/layout/mind.js
+1
-1
view.js
src/module/view.js
+3
-2
zoom.js
src/module/zoom.js
+3
-1
contextmenu.js
ui/contextmenu.js
+2
-1
share.js
ui/menu/share/share.js
+2
-1
nav.js
ui/nav.js
+12
-8
_nav.less
ui/theme/default/css/_nav.less
+3
-3
_public.less
ui/theme/default/css/_public.less
+2
-2
_resource_panel.less
ui/theme/default/css/_resource_panel.less
+1
-1
_widgets.less
ui/theme/default/css/_widgets.less
+3
-1
default.all.css
ui/theme/default/css/default.all.css
+8
-6
default.all.css.map
ui/theme/default/css/default.all.css.map
+1
-1
indexbackground.jpg
ui/theme/default/images/indexbackground.jpg
+0
-0
No files found.
import.js
View file @
6a8d86c2
...
@@ -242,7 +242,8 @@
...
@@ -242,7 +242,8 @@
var
e
=
stack
.
indexOf
(
' at '
)
!==
-
1
?
' at '
:
'@'
;
var
e
=
stack
.
indexOf
(
' at '
)
!==
-
1
?
' at '
:
'@'
;
while
(
stack
.
indexOf
(
e
)
!==
-
1
)
while
(
stack
.
indexOf
(
e
)
!==
-
1
)
stack
=
stack
.
substring
(
stack
.
indexOf
(
e
)
+
e
.
length
);
stack
=
stack
.
substring
(
stack
.
indexOf
(
e
)
+
e
.
length
);
stack
=
stack
.
substring
(
0
,
stack
.
indexOf
(
':'
,
stack
.
indexOf
(
':'
)
+
1
));
stack
=
stack
.
substring
(
stack
.
indexOf
(
'http'
),
stack
.
indexOf
(
':'
,
stack
.
indexOf
(
':'
)
+
1
));
return
getScriptFromURL
(
stack
);
return
getScriptFromURL
(
stack
);
};
};
...
...
fio
@
a830f3ce
Subproject commit
f8625b0e6a7076259773a90ab4f24411aca5e71a
Subproject commit
a830f3ce3dc62a8f4cf64611045f51453a9095ac
kity
@
041d47f1
Subproject commit
96010a3eab9b6a3d76a94c1afe1aba09fa5770ea
Subproject commit
041d47f13cbf19a60baee2a6640b06851e44761f
src/layout/mind.js
View file @
6a8d86c2
...
@@ -15,7 +15,7 @@ KityMinder.registerLayout('mind', kity.createClass({
...
@@ -15,7 +15,7 @@ KityMinder.registerLayout('mind', kity.createClass({
rightLayout
.
doLayout
(
node
,
right
);
rightLayout
.
doLayout
(
node
,
right
);
var
box
=
node
.
getContentBox
();
var
box
=
node
.
getContentBox
();
node
.
setVertexOut
(
box
.
cx
,
box
.
cy
);
node
.
setVertexOut
(
new
kity
.
Point
(
box
.
cx
,
box
.
cy
)
);
node
.
setLayoutVectorOut
(
new
kity
.
Vector
(
0
,
0
));
node
.
setLayoutVectorOut
(
new
kity
.
Vector
(
0
,
0
));
},
},
...
...
src/module/view.js
View file @
6a8d86c2
...
@@ -66,8 +66,9 @@ var ViewDragger = kity.createClass("ViewDragger", {
...
@@ -66,8 +66,9 @@ var ViewDragger = kity.createClass("ViewDragger", {
height
:
minder
.
getRenderTarget
().
clientHeight
height
:
minder
.
getRenderTarget
().
clientHeight
};
};
var
m
=
this
.
getMovement
();
var
m
=
this
.
getMovement
();
var
box
=
new
kity
.
Box
(
-
m
.
x
,
-
m
.
y
,
c
.
width
,
c
.
height
);
var
box
=
new
kity
.
Box
(
0
,
0
,
c
.
width
,
c
.
height
);
return
box
;
var
viewMatrix
=
minder
.
getPaper
().
getViewPortMatrix
();
return
viewMatrix
.
inverse
().
translate
(
-
m
.
x
,
-
m
.
y
).
transformBox
(
box
);
},
},
_bind
:
function
()
{
_bind
:
function
()
{
...
...
src/module/zoom.js
View file @
6a8d86c2
...
@@ -58,7 +58,9 @@ KityMinder.registerModule('Zoom', function() {
...
@@ -58,7 +58,9 @@ KityMinder.registerModule('Zoom', function() {
timeline
.
pause
();
timeline
.
pause
();
}
}
timeline
=
animator
.
start
(
minder
,
300
,
'easeInOutSine'
,
function
()
{});
timeline
=
animator
.
start
(
minder
,
300
,
'easeInOutSine'
,
function
()
{});
minder
.
fire
(
'viewchange'
);
timeline
.
on
(
'finish'
,
function
()
{
minder
.
fire
(
'viewchange'
);
});
}
}
var
ZoomCommand
=
kity
.
createClass
(
'Zoom'
,
{
var
ZoomCommand
=
kity
.
createClass
(
'Zoom'
,
{
...
...
ui/contextmenu.js
View file @
6a8d86c2
...
@@ -52,7 +52,6 @@ KityMinder.registerUI('contextmenu', function(minder) {
...
@@ -52,7 +52,6 @@ KityMinder.registerUI('contextmenu', function(minder) {
var
$li
=
$
(
'<li>'
)
var
$li
=
$
(
'<li>'
)
.
addClass
(
'fui-item'
)
.
addClass
(
'fui-item'
)
.
append
(
label
)
.
data
(
'menu'
,
item
)
.
data
(
'menu'
,
item
)
.
appendTo
(
$menu
);
.
appendTo
(
$menu
);
...
@@ -71,6 +70,8 @@ KityMinder.registerUI('contextmenu', function(minder) {
...
@@ -71,6 +70,8 @@ KityMinder.registerUI('contextmenu', function(minder) {
});
});
}
}
$li
.
append
(
$
(
'<div>'
).
text
(
label
).
addClass
(
'menu-label'
));
lastDivider
=
false
;
lastDivider
=
false
;
}
}
...
...
ui/menu/share/share.js
View file @
6a8d86c2
...
@@ -191,7 +191,8 @@ KityMinder.registerUI('menu/share/share', function(minder) {
...
@@ -191,7 +191,8 @@ KityMinder.registerUI('menu/share/share', function(minder) {
}
}
function
uuid
()
{
function
uuid
()
{
var
timeLead
=
1
e9
;
// 最多使用 1e7,否则 IE toString() 会出来指数表示法
var
timeLead
=
1
e7
;
return
((
+
new
Date
()
*
timeLead
)
+
(
Math
.
random
()
*
--
timeLead
)).
toString
(
36
);
return
((
+
new
Date
()
*
timeLead
)
+
(
Math
.
random
()
*
--
timeLead
)).
toString
(
36
);
}
}
...
...
ui/nav.js
View file @
6a8d86c2
...
@@ -80,8 +80,7 @@ KityMinder.registerUI('nav', function(minder) {
...
@@ -80,8 +80,7 @@ KityMinder.registerUI('nav', function(minder) {
// 表示可视区域的矩形
// 表示可视区域的矩形
var
visibleRect
=
paper
.
put
(
new
kity
.
Rect
(
100
,
100
).
stroke
(
'red'
,
'1%'
));
var
visibleRect
=
paper
.
put
(
new
kity
.
Rect
(
100
,
100
).
stroke
(
'red'
,
'1%'
));
// 分别表示脑图内容区域大小和当前见区域大小
var
contentView
=
new
kity
.
Box
(),
visibleView
=
new
kity
.
Box
();
var
contentView
,
visibleView
;
navigate
();
navigate
();
...
@@ -109,10 +108,16 @@ KityMinder.registerUI('nav', function(minder) {
...
@@ -109,10 +108,16 @@ KityMinder.registerUI('nav', function(minder) {
function
navigate
()
{
function
navigate
()
{
function
moveView
(
center
,
duration
)
{
function
moveView
(
center
,
duration
)
{
var
box
=
visible
Rect
.
getBox
()
;
var
box
=
visible
View
;
center
.
x
=
-
center
.
x
;
center
.
x
=
-
center
.
x
;
center
.
y
=
-
center
.
y
;
center
.
y
=
-
center
.
y
;
minder
.
getViewDragger
().
moveTo
(
center
.
offset
(
box
.
width
/
2
,
box
.
height
/
2
),
duration
);
var
viewMatrix
=
minder
.
getPaper
().
getViewPortMatrix
();
box
=
viewMatrix
.
transformBox
(
box
);
var
targetPosition
=
center
.
offset
(
box
.
width
/
2
,
box
.
height
/
2
);
minder
.
getViewDragger
().
moveTo
(
targetPosition
,
duration
);
}
}
var
dragging
=
false
;
var
dragging
=
false
;
...
@@ -137,9 +142,9 @@ KityMinder.registerUI('nav', function(minder) {
...
@@ -137,9 +142,9 @@ KityMinder.registerUI('nav', function(minder) {
function
updateContentView
()
{
function
updateContentView
()
{
contentV
iew
=
minder
.
getRenderContainer
().
getBoundaryBox
();
var
v
iew
=
minder
.
getRenderContainer
().
getBoundaryBox
();
var
view
=
visibleView
?
contentView
.
merge
(
visibleView
)
:
contentV
iew
;
contentView
=
v
iew
;
var
padding
=
30
;
var
padding
=
30
;
...
@@ -183,8 +188,7 @@ KityMinder.registerUI('nav', function(minder) {
...
@@ -183,8 +188,7 @@ KityMinder.registerUI('nav', function(minder) {
function
updateVisibleView
()
{
function
updateVisibleView
()
{
visibleView
=
minder
.
getViewDragger
().
getView
();
visibleView
=
minder
.
getViewDragger
().
getView
();
visibleRect
.
setBox
(
visibleView
);
visibleRect
.
setBox
(
visibleView
.
intersect
(
contentView
));
updateContentView
();
}
}
return
$previewNavigator
;
return
$previewNavigator
;
...
...
ui/theme/default/css/_nav.less
View file @
6a8d86c2
.preview-navigator {
.preview-navigator {
background: white;
background: white;
width: 1
8
0px;
width: 1
4
0px;
height: 120px;
height: 120px;
position: absolute;
position: absolute;
left: 45px;
left: 45px;
bottom: 30px;
bottom: 30px;
box-shadow: 0 0
5px rgba(0, 0, 0, .1
);
box-shadow: 0 0
8px rgba(0, 0, 0, .2
);
border-radius: 0 2px 2px 0;
border-radius: 0 2px 2px 0;
padding:
3
px;
padding:
1
px;
z-index: 9;
z-index: 9;
cursor: crosshair;
cursor: crosshair;
...
...
ui/theme/default/css/_public.less
View file @
6a8d86c2
...
@@ -174,13 +174,13 @@ input[type=url] {
...
@@ -174,13 +174,13 @@ input[type=url] {
color: hsl(0, 0%, 43%);
color: hsl(0, 0%, 43%);
/* text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.25); */
/* text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.25); */
white-space: nowrap;
white-space: nowrap;
vertical-align:
baselin
e;
vertical-align:
middl
e;
background-color: hsl(0, 0%, 99%);
background-color: hsl(0, 0%, 99%);
border-radius: 3px;
border-radius: 3px;
border: 1px solid hsl(0, 0%, 80%);
border: 1px solid hsl(0, 0%, 80%);
text-transform: capitalize;
text-transform: capitalize;
box-shadow: inset 0 -2px hsl(0, 0%, 92%), inset 0 -3px hsl(0, 100%, 100%), 0 1px 2px rgba(255, 255, 255, 0.3);
box-shadow: inset 0 -2px hsl(0, 0%, 92%), inset 0 -3px hsl(0, 100%, 100%), 0 1px 2px rgba(255, 255, 255, 0.3);
.mac &.ctrl,
.mac &.ctrl,
.mac &.shift,
.mac &.shift,
.mac &.alt,
.mac &.alt,
...
...
ui/theme/default/css/_resource_panel.less
View file @
6a8d86c2
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
& > .fui-button {
& > .fui-button {
left: auto;
left: auto;
right: 6px;
right: 6px;
top:
11
px;
top:
8
px;
padding: 1px 3px;
padding: 1px 3px;
vertical-align: middle;
vertical-align: middle;
position: absolute;
position: absolute;
...
...
ui/theme/default/css/_widgets.less
View file @
6a8d86c2
...
@@ -349,7 +349,7 @@
...
@@ -349,7 +349,7 @@
.fui-popup-menu {
.fui-popup-menu {
position: absolute;
position: absolute;
z-index: 9999
9999999
;
z-index: 9999;
min-width: 160px;
min-width: 160px;
padding: 5px 0;
padding: 5px 0;
font-size: 12px;
font-size: 12px;
...
@@ -359,6 +359,7 @@
...
@@ -359,6 +359,7 @@
box-shadow: 0 1px 15px rgba(0, 0, 0, 0.3);
box-shadow: 0 1px 15px rgba(0, 0, 0, 0.3);
background-clip: padding-box;
background-clip: padding-box;
font-family: Arial, "Heiti SC", "Microsoft Yahei";
font-family: Arial, "Heiti SC", "Microsoft Yahei";
overflow: hidden;
&:empty {
&:empty {
display: none !important;
display: none !important;
...
@@ -386,6 +387,7 @@
...
@@ -386,6 +387,7 @@
white-space: nowrap;
white-space: nowrap;
text-decoration: none;
text-decoration: none;
font-size: 12px;
font-size: 12px;
overflow: hidden;
transition: none;
transition: none;
...
...
ui/theme/default/css/default.all.css
View file @
6a8d86c2
...
@@ -719,7 +719,7 @@ input[type=url]:focus {
...
@@ -719,7 +719,7 @@ input[type=url]:focus {
color
:
#6e6e6e
;
color
:
#6e6e6e
;
/* text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.25); */
/* text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.25); */
white-space
:
nowrap
;
white-space
:
nowrap
;
vertical-align
:
baselin
e
;
vertical-align
:
middl
e
;
background-color
:
#fcfcfc
;
background-color
:
#fcfcfc
;
border-radius
:
3px
;
border-radius
:
3px
;
border
:
1px
solid
#cccccc
;
border
:
1px
solid
#cccccc
;
...
@@ -1159,7 +1159,7 @@ li {
...
@@ -1159,7 +1159,7 @@ li {
}
}
.fui-popup-menu
{
.fui-popup-menu
{
position
:
absolute
;
position
:
absolute
;
z-index
:
9999
9999999
;
z-index
:
9999
;
min-width
:
160px
;
min-width
:
160px
;
padding
:
5px
0
;
padding
:
5px
0
;
font-size
:
12px
;
font-size
:
12px
;
...
@@ -1169,6 +1169,7 @@ li {
...
@@ -1169,6 +1169,7 @@ li {
box-shadow
:
0
1px
15px
rgba
(
0
,
0
,
0
,
0.3
);
box-shadow
:
0
1px
15px
rgba
(
0
,
0
,
0
,
0.3
);
background-clip
:
padding-box
;
background-clip
:
padding-box
;
font-family
:
Arial
,
"Heiti SC"
,
"Microsoft Yahei"
;
font-family
:
Arial
,
"Heiti SC"
,
"Microsoft Yahei"
;
overflow
:
hidden
;
}
}
.fui-popup-menu
:empty
{
.fui-popup-menu
:empty
{
display
:
none
!important
;
display
:
none
!important
;
...
@@ -1189,6 +1190,7 @@ li {
...
@@ -1189,6 +1190,7 @@ li {
white-space
:
nowrap
;
white-space
:
nowrap
;
text-decoration
:
none
;
text-decoration
:
none
;
font-size
:
12px
;
font-size
:
12px
;
overflow
:
hidden
;
transition
:
none
;
transition
:
none
;
}
}
.fui-popup-menu
.fui-item
.fui-label
,
.fui-popup-menu
.fui-item
.fui-label
,
...
@@ -2577,7 +2579,7 @@ body {
...
@@ -2577,7 +2579,7 @@ body {
#resource-panel
>
.fui-panel-content
>
.fui-label-panel-content
>
.fui-button
{
#resource-panel
>
.fui-panel-content
>
.fui-label-panel-content
>
.fui-button
{
left
:
auto
;
left
:
auto
;
right
:
6px
;
right
:
6px
;
top
:
11
px
;
top
:
8
px
;
padding
:
1px
3px
;
padding
:
1px
3px
;
vertical-align
:
middle
;
vertical-align
:
middle
;
position
:
absolute
;
position
:
absolute
;
...
@@ -3229,14 +3231,14 @@ ul.resource-list li {
...
@@ -3229,14 +3231,14 @@ ul.resource-list li {
}
}
.preview-navigator
{
.preview-navigator
{
background
:
white
;
background
:
white
;
width
:
1
8
0px
;
width
:
1
4
0px
;
height
:
120px
;
height
:
120px
;
position
:
absolute
;
position
:
absolute
;
left
:
45px
;
left
:
45px
;
bottom
:
30px
;
bottom
:
30px
;
box-shadow
:
0
0
5px
rgba
(
0
,
0
,
0
,
0.1
);
box-shadow
:
0
0
8px
rgba
(
0
,
0
,
0
,
0.2
);
border-radius
:
0
2px
2px
0
;
border-radius
:
0
2px
2px
0
;
padding
:
3
px
;
padding
:
1
px
;
z-index
:
9
;
z-index
:
9
;
cursor
:
crosshair
;
cursor
:
crosshair
;
}
}
...
...
ui/theme/default/css/default.all.css.map
View file @
6a8d86c2
This diff is collapsed.
Click to expand it.
ui/theme/default/images/indexbackground.jpg
View replaced file @
7a40b781
View file @
6a8d86c2
103 KB
|
W:
|
H:
88.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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