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
6fb2b455
Commit
6fb2b455
authored
Jun 20, 2017
by
SergeyLuzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs with connector's tracks
parent
b124f435
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
135 additions
and
53 deletions
+135
-53
common/Drawings/Format/CnxShape.js
common/Drawings/Format/CnxShape.js
+41
-14
common/Drawings/States.js
common/Drawings/States.js
+11
-0
common/Drawings/TrackObjects/ConnectorTrack.js
common/Drawings/TrackObjects/ConnectorTrack.js
+79
-38
slide/Editor/Format/Slide.js
slide/Editor/Format/Slide.js
+4
-1
No files found.
common/Drawings/Format/CnxShape.js
View file @
6fb2b455
...
...
@@ -558,17 +558,31 @@
var
_xfrm
=
this
.
spPr
.
xfrm
;
if
(
oBeginDrawing
&&
oEndDrawing
){
_startConnectionParams
=
oBeginDrawing
.
getConnectionParams
(
this
.
getStCxnIdx
(),
this
.
group
);
_endConnectionParams
=
oEndDrawing
.
getConnectionParams
(
this
.
getEndCxnIdx
(),
this
.
group
);
_startConnectionParams
=
oBeginDrawing
.
getConnectionParams
(
this
.
getStCxnIdx
(),
null
);
_endConnectionParams
=
oEndDrawing
.
getConnectionParams
(
this
.
getEndCxnIdx
(),
null
);
_spPr
=
AscFormat
.
fCalculateSpPr
(
_startConnectionParams
,
_endConnectionParams
,
this
.
spPr
.
geometry
.
preset
,
this
.
pen
.
w
);
_xfrm2
=
_spPr
.
xfrm
;
_xfrm
.
setOffX
(
_xfrm2
.
offX
);
_xfrm
.
setOffY
(
_xfrm2
.
offY
);
_xfrm
.
setExtX
(
_xfrm2
.
extX
);
_xfrm
.
setExtY
(
_xfrm2
.
extY
);
if
(
!
this
.
group
){
_xfrm
.
setOffX
(
_xfrm2
.
offX
);
_xfrm
.
setOffY
(
_xfrm2
.
offY
);
_xfrm
.
setFlipH
(
_xfrm2
.
flipH
);
_xfrm
.
setFlipV
(
_xfrm2
.
flipV
);
_xfrm
.
setRot
(
_xfrm2
.
rot
);
}
else
{
var
_xc
=
_xfrm2
.
offX
+
_xfrm2
.
extX
/
2.0
;
var
_yc
=
_xfrm2
.
offY
+
_xfrm2
.
extY
/
2.0
;
var
xc
=
this
.
group
.
invertTransform
.
TransformPointX
(
_xc
,
_yc
);
var
yc
=
this
.
group
.
invertTransform
.
TransformPointY
(
_xc
,
_yc
);
_xfrm
.
setOffX
(
xc
-
_xfrm2
.
extX
/
2.0
);
_xfrm
.
setOffY
(
yc
-
_xfrm2
.
extY
/
2.0
);
_xfrm
.
setFlipH
(
this
.
group
.
getFullFlipH
()
?
!
_xfrm2
.
flipH
:
_xfrm2
.
flipH
);
_xfrm
.
setFlipV
(
this
.
group
.
getFullFlipV
()
?
!
_xfrm2
.
flipV
:
_xfrm2
.
flipV
);
_xfrm
.
setRot
(
AscFormat
.
normalizeRotate
(
_xfrm2
.
rot
-
this
.
group
.
getFullRotate
()));
}
this
.
spPr
.
setGeometry
(
_spPr
.
geometry
.
createDuplicate
());
this
.
checkDrawingBaseCoords
();
this
.
recalculate
();
...
...
@@ -619,10 +633,10 @@
}
else
{
if
(
oBeginDrawing
){
_startConnectionParams
=
oBeginDrawing
.
getConnectionParams
(
this
.
getStCxnIdx
(),
this
.
group
);
_startConnectionParams
=
oBeginDrawing
.
getConnectionParams
(
this
.
getStCxnIdx
(),
null
);
}
if
(
oEndDrawing
){
_endConnectionParams
=
oEndDrawing
.
getConnectionParams
(
this
.
getEndCxnIdx
(),
this
.
group
);
_endConnectionParams
=
oEndDrawing
.
getConnectionParams
(
this
.
getEndCxnIdx
(),
null
);
}
var
_tx
,
_ty
;
if
(
_startConnectionParams
||
_endConnectionParams
){
...
...
@@ -639,13 +653,26 @@
}
_spPr
=
AscFormat
.
fCalculateSpPr
(
_startConnectionParams
,
_endConnectionParams
,
this
.
spPr
.
geometry
.
preset
,
this
.
pen
&&
this
.
pen
.
w
);
_xfrm2
=
_spPr
.
xfrm
;
_xfrm
.
setOffX
(
_xfrm2
.
offX
);
_xfrm
.
setOffY
(
_xfrm2
.
offY
);
_xfrm
.
setExtX
(
_xfrm2
.
extX
);
_xfrm
.
setExtY
(
_xfrm2
.
extY
);
if
(
!
this
.
group
){
_xfrm
.
setOffX
(
_xfrm2
.
offX
);
_xfrm
.
setOffY
(
_xfrm2
.
offY
);
_xfrm
.
setFlipH
(
_xfrm2
.
flipH
);
_xfrm
.
setFlipV
(
_xfrm2
.
flipV
);
_xfrm
.
setRot
(
_xfrm2
.
rot
);
}
else
{
var
_xc
=
_xfrm2
.
offX
+
_xfrm2
.
extX
/
2.0
;
var
_yc
=
_xfrm2
.
offY
+
_xfrm2
.
extY
/
2.0
;
var
xc
=
this
.
group
.
invertTransform
.
TransformPointX
(
_xc
,
_yc
);
var
yc
=
this
.
group
.
invertTransform
.
TransformPointY
(
_xc
,
_yc
);
_xfrm
.
setOffX
(
xc
-
_xfrm2
.
extX
/
2.0
);
_xfrm
.
setOffY
(
yc
-
_xfrm2
.
extY
/
2.0
);
_xfrm
.
setFlipH
(
this
.
group
.
getFullFlipH
()
?
!
_xfrm2
.
flipH
:
_xfrm2
.
flipH
);
_xfrm
.
setFlipV
(
this
.
group
.
getFullFlipV
()
?
!
_xfrm2
.
flipV
:
_xfrm2
.
flipV
);
_xfrm
.
setRot
(
AscFormat
.
normalizeRotate
(
_xfrm2
.
rot
-
this
.
group
.
getFullRotate
()));
}
this
.
spPr
.
setGeometry
(
_spPr
.
geometry
.
createDuplicate
());
this
.
checkDrawingBaseCoords
();
this
.
recalculate
();
...
...
common/Drawings/States.js
View file @
6fb2b455
...
...
@@ -701,9 +701,20 @@ RotateState.prototype =
}
}
var
aAllConnectors
=
drawingObjects
.
getAllConnectorsByDrawings
(
oOriginalObjects
,
[],
undefined
,
true
);
var
oGroupMaps
=
{};
for
(
i
=
0
;
i
<
aAllConnectors
.
length
;
++
i
){
if
(
!
oMapOriginalsId
[
aAllConnectors
[
i
].
Get_Id
()]){
aAllConnectors
[
i
].
calculateTransform
(((
oThis
instanceof
MoveInGroupState
)
||
(
oThis
instanceof
MoveState
)));
var
oGroup
=
aAllConnectors
[
i
].
getMainGroup
();
if
(
oGroup
){
}
oGroupMaps
[
oGroup
.
Id
]
=
oGroup
;
}
}
for
(
var
key
in
oGroupMaps
){
if
(
oGroupMaps
.
hasOwnProperty
(
key
)){
oGroupMaps
[
key
].
updateCoordinatesAfterInternalResize
();
}
}
}
...
...
common/Drawings/TrackObjects/ConnectorTrack.js
View file @
6fb2b455
This diff is collapsed.
Click to expand it.
slide/Editor/Format/Slide.js
View file @
6fb2b455
...
...
@@ -1258,7 +1258,10 @@ Slide.prototype =
}
}
else
{
if
(
sp
.
getObjectType
()
===
AscDFH
.
historyitem_type_GroupShape
){
sp
.
handleUpdateTheme
();
sp
.
checkExtentsByDocContent
();
}
}
}
},
...
...
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