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
3001e7f0
Commit
3001e7f0
authored
Nov 03, 2015
by
张博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug of tianpan outline box
parent
79d34031
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
outline.js
src/module/outline.js
+7
-7
text.js
src/module/text.js
+1
-7
No files found.
src/module/outline.js
View file @
3001e7f0
...
...
@@ -41,15 +41,15 @@ define(function(require, exports, module) {
var
radius
=
node
.
getStyle
(
'radius'
);
// 天盘图圆形的情况
if
(
shape
&&
shape
==
'circle'
)
{
var
width
=
Math
.
max
(
box
.
width
,
box
.
height
);
outlineBox
.
width
=
width
+
paddingLeft
+
paddingRight
;
outlineBox
.
height
=
width
+
paddingTop
+
paddingBottom
;
var
p
=
Math
.
pow
;
var
r
=
Math
.
round
;
outlineBox
.
width
=
Math
.
max
(
outlineBox
.
width
,
outlineBox
.
height
);
outlineBox
.
height
=
Math
.
max
(
outlineBox
.
width
,
outlineBox
.
height
);
radius
=
r
(
Math
.
sqrt
(
p
(
outlineBox
.
width
,
2
)
+
p
(
outlineBox
.
height
,
2
))
/
2
);
radius
=
outlineBox
.
width
/
2
;
outlineBox
.
x
=
box
.
cx
-
radius
;
outlineBox
.
y
=
box
.
cy
-
radius
;
outlineBox
.
width
=
2
*
radius
;
outlineBox
.
height
=
2
*
radius
;
}
var
prefix
=
node
.
isSelected
()
?
(
node
.
getMinder
().
isFocused
()
?
'selected-'
:
'blur-selected-'
)
:
''
;
...
...
src/module/text.js
View file @
3001e7f0
...
...
@@ -226,13 +226,7 @@ define(function(require, exports, module) {
rBox
=
rBox
.
merge
(
new
kity
.
Box
(
0
,
y
,
bbox
.
height
&&
bbox
.
width
||
1
,
fontSize
));
});
//为了让文字在圆中垂直居中
var
w
=
0
;
var
shape
=
node
.
getStyle
(
'shape'
);
if
(
shape
&&
shape
==
'circle'
){
w
=
Math
.
max
(
rBox
.
width
,
rBox
.
height
)
/
2
-
rBox
.
height
/
2
;
}
var
nBox
=
new
kity
.
Box
(
r
(
rBox
.
x
),
r
(
rBox
.
y
-
w
),
r
(
rBox
.
width
),
r
(
rBox
.
height
));
var
nBox
=
new
kity
.
Box
(
r
(
rBox
.
x
),
r
(
rBox
.
y
),
r
(
rBox
.
width
),
r
(
rBox
.
height
));
node
.
_currentTextGroupBox
=
nBox
;
return
nBox
;
...
...
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