Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
db301e93
Commit
db301e93
authored
May 24, 2017
by
SergeyLuzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
calculation connectors params
parent
abbd6c43
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
common/Drawings/CommonController.js
common/Drawings/CommonController.js
+1
-1
common/Drawings/Format/CnxShape.js
common/Drawings/Format/CnxShape.js
+2
-6
common/Drawings/TrackObjects/ConnectorTrack.js
common/Drawings/TrackObjects/ConnectorTrack.js
+1
-1
No files found.
common/Drawings/CommonController.js
View file @
db301e93
...
...
@@ -679,7 +679,7 @@ function getTargetTextObject(controller)
function
isConnectorPreset
(
sPreset
){
if
(
typeof
sPreset
===
"
string
"
&&
sPreset
.
length
>
0
){
return
"
line
"
===
sPreset
||
sPreset
.
toLowerCase
().
indexOf
(
"
connector
"
)
>
-
1
;
return
(
sPreset
.
toLowerCase
().
indexOf
(
"
line
"
)
>
-
1
||
sPreset
.
toLowerCase
().
indexOf
(
"
connector
"
)
>
-
1
)
;
}
return
false
;
}
...
...
common/Drawings/Format/CnxShape.js
View file @
db301e93
...
...
@@ -128,19 +128,15 @@
_begin
.
transform
(
oTransform
);
_end
.
transform
(
oTransform
);
var
posX
=
Math
.
min
(
_begin
.
x
,
_end
.
x
);
var
posY
=
Math
.
min
(
_begin
.
y
,
_end
.
y
);
var
extX
=
Math
.
max
(
penW
/
36000.0
,
Math
.
abs
(
_end
.
x
-
_begin
.
x
));
var
extY
=
Math
.
max
(
penW
/
36000.0
,
Math
.
abs
(
_end
.
y
-
_begin
.
y
));
var
flipV
=
false
;
var
flipH
=
false
;
var
rot
=
0
;
var
oMapAdj
=
{};
var
tmp
;
var
xc
=
posX
+
extX
/
2
,
yc
=
posY
+
extY
/
2
;
if
(
sPreset
===
"
line
"
){
flipH
=
(
begin
.
x
>
_end
.
x
);
flipV
=
(
begin
.
y
>
_end
.
y
);
flipH
=
(
_
begin
.
x
>
_end
.
x
);
flipV
=
(
_
begin
.
y
>
_end
.
y
);
}
else
{
var
sPrefix
=
"
bentConnector
"
;
...
...
common/Drawings/TrackObjects/ConnectorTrack.js
View file @
db301e93
...
...
@@ -68,7 +68,7 @@
_endConnectionParams
=
this
.
endShape
.
convertToConnectionParams
(
this
.
endShape
.
rot
,
this
.
endShape
.
transform
,
this
.
endShape
.
bounds
,
g_conn_info
);
}
else
{
_endConnectionParams
=
AscFormat
.
fCalculateConnectionInfo
(
_
end
ConnectionParams
,
this
.
endX
,
this
.
endY
);
_endConnectionParams
=
AscFormat
.
fCalculateConnectionInfo
(
_
start
ConnectionParams
,
this
.
endX
,
this
.
endY
);
}
}
this
.
oSpPr
=
AscFormat
.
fCalculateSpPr
(
_startConnectionParams
,
_endConnectionParams
,
this
.
connector
.
spPr
.
geometry
.
preset
,
this
.
overlayObject
.
pen
.
w
);
...
...
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