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
37a5506d
Commit
37a5506d
authored
Jul 08, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
5cee1be9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
+17
-17
bottom.js
src/layout/bottom.js
+1
-1
expand.js
src/module/expand.js
+0
-3
image.js
src/module/image.js
+10
-7
resource.js
src/module/resource.js
+5
-5
zoom.js
src/module/zoom.js
+1
-1
No files found.
src/layout/bottom.js
View file @
37a5506d
...
@@ -49,7 +49,7 @@ KityMinder.registerLayout('bottom', kity.createClass({
...
@@ -49,7 +49,7 @@ KityMinder.registerLayout('bottom', kity.createClass({
if
(
i
>
0
)
{
if
(
i
>
0
)
{
x
+=
children
[
i
].
getStyle
(
'margin-left'
);
x
+=
children
[
i
].
getStyle
(
'margin-left'
);
}
}
y
=
nodeContentBox
.
height
+
node
.
getStyle
(
'margin-bottom'
)
+
children
[
i
]
.
getStyle
(
'margin-top'
);
y
=
nodeContentBox
.
bottom
-
childContentBox
.
top
+
node
.
getStyle
(
'margin-bottom'
)
+
child
.
getStyle
(
'margin-top'
);
children
[
i
].
setLayoutTransform
(
new
kity
.
Matrix
().
translate
(
x
,
y
));
children
[
i
].
setLayoutTransform
(
new
kity
.
Matrix
().
translate
(
x
,
y
));
x
+=
childTreeBox
.
width
/
2
+
children
[
i
].
getStyle
(
'margin-right'
);
x
+=
childTreeBox
.
width
/
2
+
children
[
i
].
getStyle
(
'margin-right'
);
}
}
...
...
src/module/expand.js
View file @
37a5506d
...
@@ -228,9 +228,6 @@ KityMinder.registerModule('Expand', function() {
...
@@ -228,9 +228,6 @@ KityMinder.registerModule('Expand', function() {
r
.
update
(
r
.
getRenderShape
(),
e
.
node
);
r
.
update
(
r
.
getRenderShape
(),
e
.
node
);
}
}
},
},
'preimport'
:
function
(
e
)
{
var
json
=
e
.
json
;
},
'beforerender'
:
function
(
e
)
{
'beforerender'
:
function
(
e
)
{
var
node
=
e
.
node
;
var
node
=
e
.
node
;
var
visible
=
!
node
.
parent
||
node
.
parent
.
isExpanded
();
var
visible
=
!
node
.
parent
||
node
.
parent
.
isExpanded
();
...
...
src/module/image.js
View file @
37a5506d
...
@@ -24,8 +24,8 @@ KityMinder.registerModule('image', function() {
...
@@ -24,8 +24,8 @@ KityMinder.registerModule('image', function() {
}
}
return
{
return
{
width
:
width
,
width
:
width
|
0
,
height
:
height
height
:
height
|
0
};
};
}
}
...
@@ -118,14 +118,17 @@ KityMinder.registerModule('image', function() {
...
@@ -118,14 +118,17 @@ KityMinder.registerModule('image', function() {
if
(
!
size
)
return
;
if
(
!
size
)
return
;
var
x
=
box
.
cx
-
size
.
width
/
2
;
var
y
=
box
.
y
-
size
.
height
-
spaceTop
;
image
image
.
setUrl
(
url
)
.
setUrl
(
url
)
.
setX
(
box
.
cx
-
size
.
width
/
2
)
.
setX
(
x
|
0
)
.
setY
(
box
.
y
-
size
.
height
-
spaceTop
)
.
setY
(
y
|
0
)
.
setWidth
(
size
.
width
)
.
setWidth
(
size
.
width
|
0
)
.
setHeight
(
size
.
height
);
.
setHeight
(
size
.
height
|
0
);
return
new
kity
.
Box
(
image
.
getX
(),
image
.
getY
(),
size
.
width
,
size
.
height
);
return
new
kity
.
Box
(
x
|
0
,
y
|
0
,
size
.
width
|
0
,
size
.
height
|
0
);
}
}
});
});
...
...
src/module/resource.js
View file @
37a5506d
...
@@ -202,9 +202,9 @@ KityMinder.registerModule('Resource', function() {
...
@@ -202,9 +202,9 @@ KityMinder.registerModule('Resource', function() {
rect
=
this
.
rect
;
rect
=
this
.
rect
;
rect
.
setPosition
(
0
,
box
.
y
-
paddingY
);
rect
.
setPosition
(
0
,
box
.
y
-
paddingY
);
rect
.
setSize
(
this
.
width
=
Math
.
round
(
box
.
width
+
paddingX
*
2
);
this
.
width
=
box
.
width
+
paddingX
*
2
,
this
.
height
=
Math
.
round
(
box
.
height
+
paddingY
*
2
);
this
.
height
=
box
.
height
+
paddingY
*
2
);
rect
.
setSize
(
this
.
width
,
this
.
height
);
rect
.
fill
(
color
);
rect
.
fill
(
color
);
}
}
});
});
...
@@ -244,7 +244,7 @@ KityMinder.registerModule('Resource', function() {
...
@@ -244,7 +244,7 @@ KityMinder.registerModule('Resource', function() {
}
}
overlay
.
setVisible
(
true
);
overlay
.
setVisible
(
true
);
overlay
.
setValue
(
resource
[
i
],
minder
.
getResourceColor
(
resource
[
i
]));
overlay
.
setValue
(
resource
[
i
],
minder
.
getResourceColor
(
resource
[
i
]));
overlay
.
setTranslate
(
x
,
0
);
overlay
.
setTranslate
(
x
,
-
1
);
x
+=
overlay
.
width
;
x
+=
overlay
.
width
;
}
}
...
@@ -255,7 +255,7 @@ KityMinder.registerModule('Resource', function() {
...
@@ -255,7 +255,7 @@ KityMinder.registerModule('Resource', function() {
return
{
return
{
x
:
box
.
right
,
x
:
box
.
right
,
y
:
-
overlays
[
0
].
height
/
2
,
y
:
Math
.
round
(
-
overlays
[
0
].
height
/
2
)
,
width
:
x
,
width
:
x
,
height
:
overlays
[
0
].
height
height
:
overlays
[
0
].
height
};
};
...
...
src/module/zoom.js
View file @
37a5506d
...
@@ -3,7 +3,7 @@ KityMinder.registerModule('Zoom', function() {
...
@@ -3,7 +3,7 @@ KityMinder.registerModule('Zoom', function() {
var
timeline
;
var
timeline
;
me
.
setDefaultOptions
(
'zoom'
,
[
50
,
80
,
100
,
120
,
150
,
200
]);
me
.
setDefaultOptions
(
'zoom'
,
[
10
,
20
,
30
,
50
,
80
,
100
,
120
,
150
,
200
]);
function
fixPaperCTM
(
paper
)
{
function
fixPaperCTM
(
paper
)
{
var
node
=
paper
.
shapeNode
;
var
node
=
paper
.
shapeNode
;
...
...
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